Merge pull request #153 from Phyks/default-nogo-weight

Fix default nogo weight for polygons
This commit is contained in:
abrensch 2019-05-11 12:04:07 +02:00 committed by GitHub
commit c667f0935d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -280,9 +280,13 @@ public class ServerHandler extends RequestHandler {
int lat = (int)( ( Double.parseDouble(slat) + 90. ) *1000000. + 0.5); int lat = (int)( ( Double.parseDouble(slat) + 90. ) *1000000. + 0.5);
polygon.addVertex(lon, lat); polygon.addVertex(lon, lat);
} }
String nogoWeight = "NaN";
if (j < lonLatList.length) { if (j < lonLatList.length) {
polygon.nogoWeight = Double.parseDouble( lonLatList[j] ); nogoWeight = lonLatList[j];
} }
polygon.nogoWeight = Double.parseDouble( nogoWeight );
if ( polygon.points.size() > 0 ) if ( polygon.points.size() > 0 )
{ {
polygon.calcBoundingCircle(); polygon.calcBoundingCircle();