Add conditional tags to geocoding

This commit is contained in:
Victor Shcherb 2019-07-21 14:09:04 +02:00
parent 446e991ca5
commit 918495b2ad
2 changed files with 5 additions and 3 deletions

View file

@ -142,6 +142,7 @@ public class GeocodingUtilities {
public List<GeocodingResult> reverseGeocodingSearch(RoutingContext ctx, double lat, double lon, boolean allowEmptyNames) throws IOException {
ctx.conditionalTime = System.currentTimeMillis();
RoutePlannerFrontEnd rp = new RoutePlannerFrontEnd();
List<GeocodingResult> lst = new ArrayList<GeocodingUtilities.GeocodingResult>();
List<RouteSegmentPoint> listR = new ArrayList<BinaryRoutePlanner.RouteSegmentPoint>();

View file

@ -619,7 +619,6 @@ public class RoutingContext {
int cnt = 4;
while (cnt-- >= 0) {
for (int i = 0; (usedMem1 < usedMem2) && (i < 1000); ++i) {
// AVIAN FIXME
runtime.runFinalization();
runtime.gc();
Thread.yield();
@ -711,9 +710,11 @@ public class RoutingContext {
ctx.timeToLoad += (System.nanoTime() - nanoTime);
if (res != null) {
for (RouteDataObject ro : res) {
boolean accept = ro != null;
if (ctx != null) {
if (ctx != null && ro != null) {
if(ctx.conditionalTime != 0) {
ro.processConditionalTags(ctx.conditionalTime);
}
accept = ctx.getRouter().acceptLine(ro);
}
if (accept) {