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) {
|
||||
possiblyLeftTurn = true;
|
||||
}
|
||||
if (turn == TurnType.TRU || sturn == TurnType.TRU || sturn == TurnType.TRU) {
|
||||
if (turn == TurnType.TRU || sturn == TurnType.TRU || tturn == TurnType.TRU) {
|
||||
possiblyRightTurn = true;
|
||||
}
|
||||
}
|
||||
|
@ -1740,10 +1740,8 @@ public class RouteResultPreparation {
|
|||
}
|
||||
};
|
||||
} else {
|
||||
// Here we assume that all segments should be attached by native
|
||||
it = null;
|
||||
// RouteSegment rt = ctx.loadRouteSegment(road.getPoint31XTile(pointInd), road.getPoint31YTile(pointInd), ctx.config.memoryLimitation);
|
||||
// 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
|
||||
while (it != null && it.hasNext()) {
|
||||
|
|
|
@ -326,7 +326,7 @@ public class RoutingContext {
|
|||
|
||||
} else {
|
||||
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));
|
||||
ts.setLoadedNative(ns, this);
|
||||
timeToLoad += (System.nanoTime() - now);
|
||||
|
@ -654,8 +654,14 @@ public class RoutingContext {
|
|||
private RouteSegment loadRouteSegment(int x31, int y31, RoutingContext ctx,
|
||||
TLongObjectHashMap<RouteDataObject> excludeDuplications, RouteSegment original, List<RoutingSubregionTile> subregions, int subregionIndex) {
|
||||
access++;
|
||||
if (routes != null) {
|
||||
if (routes != null || (searchResult != null && searchResult.objects != null)) {
|
||||
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);
|
||||
while (segment != null) {
|
||||
RouteDataObject ro = segment.road;
|
||||
|
|
Loading…
Reference in a new issue