Fix result preparation
This commit is contained in:
parent
21ac829a3d
commit
9d20aaad2a
3 changed files with 5 additions and 6 deletions
|
@ -1739,8 +1739,10 @@ public class RouteResultPreparation {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
RouteSegment rt = ctx.loadRouteSegment(road.getPoint31XTile(pointInd), road.getPoint31YTile(pointInd), ctx.config.memoryLimitation);
|
// Here we assume that all segments should be attached by native
|
||||||
it = rt == null ? null : rt.getIterator();
|
it = null;
|
||||||
|
// 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()) {
|
||||||
|
|
|
@ -299,7 +299,7 @@ public class MapAlgorithms {
|
||||||
* count the intersections when going from lat, lon to outside the ring
|
* count the intersections when going from lat, lon to outside the ring
|
||||||
* @param polyNodes2
|
* @param polyNodes2
|
||||||
*/
|
*/
|
||||||
private static int countIntersections(Collection<Node> polyNodes, double latitude, double longitude) {
|
public static int countIntersections(Collection<Node> polyNodes, double latitude, double longitude) {
|
||||||
int intersections = 0;
|
int intersections = 0;
|
||||||
if (polyNodes.size() == 0)
|
if (polyNodes.size() == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -4,7 +4,6 @@ import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.osmand.Location;
|
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.MapObject;
|
import net.osmand.data.MapObject;
|
||||||
import net.osmand.data.QuadPoint;
|
import net.osmand.data.QuadPoint;
|
||||||
|
@ -80,8 +79,6 @@ public class MapUtils {
|
||||||
// not very accurate computation on sphere but for distances < 1000m it is ok
|
// not very accurate computation on sphere but for distances < 1000m it is ok
|
||||||
double mDist = (fromLat - toLat) * (fromLat - toLat) + (fromLon - toLon) * (fromLon - toLon);
|
double mDist = (fromLat - toLat) * (fromLat - toLat) + (fromLon - toLon) * (fromLon - toLon);
|
||||||
double projection = scalarMultiplication(fromLat, fromLon, toLat, toLon, lat, lon);
|
double projection = scalarMultiplication(fromLat, fromLon, toLat, toLon, lat, lon);
|
||||||
double prlat;
|
|
||||||
double prlon;
|
|
||||||
if (projection < 0) {
|
if (projection < 0) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (projection >= mDist) {
|
} else if (projection >= mDist) {
|
||||||
|
|
Loading…
Reference in a new issue