fix attempt
This commit is contained in:
parent
911f4788b1
commit
4b7569d05a
2 changed files with 11 additions and 7 deletions
|
@ -1256,7 +1256,7 @@ public class RouteResultPreparation {
|
||||||
if (turn == TurnType.TU || sturn == TurnType.TU || tturn == TurnType.TU) {
|
if (turn == TurnType.TU || sturn == TurnType.TU || tturn == TurnType.TU) {
|
||||||
possiblyLeftTurn = true;
|
possiblyLeftTurn = true;
|
||||||
}
|
}
|
||||||
if (turn == TurnType.TRU || sturn == TurnType.TRU || sturn == TurnType.TRU) {
|
if (turn == TurnType.TRU || sturn == TurnType.TRU || tturn == TurnType.TRU) {
|
||||||
possiblyRightTurn = true;
|
possiblyRightTurn = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1740,10 +1740,8 @@ public class RouteResultPreparation {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// Here we assume that all segments should be attached by native
|
RouteSegment rt = ctx.loadRouteSegment(road.getPoint31XTile(pointInd), road.getPoint31YTile(pointInd), ctx.config.memoryLimitation);
|
||||||
it = null;
|
it = rt == null ? null : rt.getIterator();
|
||||||
// RouteSegment rt = ctx.loadRouteSegment(road.getPoint31XTile(pointInd), road.getPoint31YTile(pointInd), ctx.config.memoryLimitation);
|
|
||||||
// it = rt == null ? null : rt.getIterator();
|
|
||||||
}
|
}
|
||||||
// try to attach all segments except with current id
|
// try to attach all segments except with current id
|
||||||
while (it != null && it.hasNext()) {
|
while (it != null && it.hasNext()) {
|
||||||
|
|
|
@ -326,7 +326,7 @@ public class RoutingContext {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
long now = System.nanoTime();
|
long now = System.nanoTime();
|
||||||
NativeRouteSearchResult ns = nativeLib.loadRouteRegion(ts.subregion, loadObjectsInMemory);
|
NativeRouteSearchResult ns = nativeLib.loadRouteRegion(ts.subregion, true);
|
||||||
// System.out.println(ts.subregion.shiftToData + " " + Arrays.toString(ns.objects));
|
// System.out.println(ts.subregion.shiftToData + " " + Arrays.toString(ns.objects));
|
||||||
ts.setLoadedNative(ns, this);
|
ts.setLoadedNative(ns, this);
|
||||||
timeToLoad += (System.nanoTime() - now);
|
timeToLoad += (System.nanoTime() - now);
|
||||||
|
@ -654,8 +654,14 @@ public class RoutingContext {
|
||||||
private RouteSegment loadRouteSegment(int x31, int y31, RoutingContext ctx,
|
private RouteSegment loadRouteSegment(int x31, int y31, RoutingContext ctx,
|
||||||
TLongObjectHashMap<RouteDataObject> excludeDuplications, RouteSegment original, List<RoutingSubregionTile> subregions, int subregionIndex) {
|
TLongObjectHashMap<RouteDataObject> excludeDuplications, RouteSegment original, List<RoutingSubregionTile> subregions, int subregionIndex) {
|
||||||
access++;
|
access++;
|
||||||
if (routes != null) {
|
if (routes != null || (searchResult != null && searchResult.objects != null)) {
|
||||||
long l = (((long) x31) << 31) + (long) y31;
|
long l = (((long) x31) << 31) + (long) y31;
|
||||||
|
if (routes == null) {
|
||||||
|
RouteDataObject[] rdos = searchResult.objects;
|
||||||
|
for (int n = 0; n < rdos.length; n++) {
|
||||||
|
add(rdos[n]);
|
||||||
|
}
|
||||||
|
}
|
||||||
RouteSegment segment = routes.get(l);
|
RouteSegment segment = routes.get(l);
|
||||||
while (segment != null) {
|
while (segment != null) {
|
||||||
RouteDataObject ro = segment.road;
|
RouteDataObject ro = segment.road;
|
||||||
|
|
Loading…
Reference in a new issue