Skip to content

Commit

Permalink
Fixed in bug that changed the shape of the convex hull with OSM map.
Browse files Browse the repository at this point in the history
  • Loading branch information
berniejenny committed Jan 8, 2018
1 parent b8fa4a5 commit d3b6b0e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ika/mapanalyst/Manager.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,17 @@ private VisualizationParameters visParams(boolean visInOldMap,
}

double[][] newPointsHull = linkManager.getNewPointsHull();

// convert convex hull around the points in the new reference map from
// the OpenStreetMap (if used). This could actually turn the convex hull
// into a concave hull due to the change of projection. The hull, however
// is only used for clipping graphics, and this change therefore does not
// matter much.
if (isUsingOpenStreetMap()) {
projector.OSM2Intermediate(newPointsHull, newPointsHull);
// getNewPointsHull returns a reference, so we need to create a copy,
// as OSM2Intermediate will change coordinates
double[][] newPointsHullIntermediate = new double[newPointsHull.length][2];
projector.OSM2Intermediate(newPointsHull, newPointsHullIntermediate);
newPointsHull = newPointsHullIntermediate;
}

// compute the graphics by calling each MapAnalyzer
Expand Down

0 comments on commit d3b6b0e

Please sign in to comment.