Merge pull request #433 from afischerdev/update-version
Repair BRouterWorker
This commit is contained in:
commit
0adc618c13
2 changed files with 2 additions and 35 deletions
|
@ -21,8 +21,8 @@ interface IBRouterService {
|
|||
//
|
||||
// "lonlats" = lon,lat|... (unlimited list of lon,lat waypoints separated by |)
|
||||
// "nogos" = lon,lat,radius|... (optional, radius in meters)
|
||||
// "polylines" = lon,lat,weight|... (unlimited list of lon,lat and weight (optional) separated by |)
|
||||
// "polygons" = lon,lat,weight|... (unlimited list of lon,lat and weight (optional) separated by |)
|
||||
// "polylines" = lon,lat,lon,lat,...,weight|... (unlimited list of lon,lat and weight (optional), lists separated by |)
|
||||
// "polygons" = lon,lat,lon,lat,...,weight|... (unlimited list of lon,lat and weight (optional), lists separated by |)
|
||||
// "profile" = profile file name without .brf
|
||||
// "alternativeidx" = [0|1|2|3] (optional, default 0)
|
||||
// "exportWaypoints" = 1 to export them (optional, default is no export)
|
||||
|
|
|
@ -318,39 +318,6 @@ public class BRouterWorker {
|
|||
}
|
||||
|
||||
private static void parseNogoPolygons(String polygons, List<OsmNodeNamed> result, boolean closed) {
|
||||
if (polygons != null) {
|
||||
OsmNogoPolygon polygon = new OsmNogoPolygon(closed);
|
||||
polygon.name = "nogopoly";
|
||||
String nogoWeight = "NaN";
|
||||
String[] polygonList = polygons.split("\\|");
|
||||
for (int i = 0; i < polygonList.length; i++) {
|
||||
String[] lonLatList = polygonList[i].split(",");
|
||||
if (lonLatList.length > 1) {
|
||||
int j;
|
||||
for (j = 0; j < 2 * (lonLatList.length / 2) - 1; ) {
|
||||
String slon = lonLatList[j++];
|
||||
String slat = lonLatList[j++];
|
||||
int lon = (int) ((Double.parseDouble(slon) + 180.) * 1000000. + 0.5);
|
||||
int lat = (int) ((Double.parseDouble(slat) + 90.) * 1000000. + 0.5);
|
||||
polygon.addVertex(lon, lat);
|
||||
}
|
||||
|
||||
|
||||
if (j < lonLatList.length) {
|
||||
nogoWeight = lonLatList[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
polygon.nogoWeight = Double.parseDouble(nogoWeight);
|
||||
|
||||
if (polygon.points.size() > 0) {
|
||||
polygon.calcBoundingCircle();
|
||||
result.add(polygon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void parseNogoPolygons_alt(String polygons, List<OsmNodeNamed> result, boolean closed) {
|
||||
if (polygons != null) {
|
||||
String[] polygonList = polygons.split("\\|");
|
||||
for (int i = 0; i < polygonList.length; i++) {
|
||||
|
|
Loading…
Reference in a new issue