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 {
|
||||
RouteSegment rt = ctx.loadRouteSegment(road.getPoint31XTile(pointInd), road.getPoint31YTile(pointInd), ctx.config.memoryLimitation);
|
||||
it = rt == null ? null : rt.getIterator();
|
||||
// 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();
|
||||
}
|
||||
// try to attach all segments except with current id
|
||||
while (it != null && it.hasNext()) {
|
||||
|
|
|
@ -299,7 +299,7 @@ public class MapAlgorithms {
|
|||
* count the intersections when going from lat, lon to outside the ring
|
||||
* @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;
|
||||
if (polyNodes.size() == 0)
|
||||
return 0;
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.util.Collections;
|
|||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.Location;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.MapObject;
|
||||
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
|
||||
double mDist = (fromLat - toLat) * (fromLat - toLat) + (fromLon - toLon) * (fromLon - toLon);
|
||||
double projection = scalarMultiplication(fromLat, fromLon, toLat, toLon, lat, lon);
|
||||
double prlat;
|
||||
double prlon;
|
||||
if (projection < 0) {
|
||||
return 0;
|
||||
} else if (projection >= mDist) {
|
||||
|
|
Loading…
Reference in a new issue