Closed karussell closed 6 years ago
The correct fix would be to remove overwriting this method in PointList.EMPTY:
public LineString toLineString(boolean includeElevation) {
throw new UnsupportedOperationException("cannot access EMPTY PointList");
}
Then we would get the correct GeoJSON equivalent as before which is also according to the specification: GeoJSON processors MAY interpret Geometry objects with empty "coordinates" arrays as null objects
Fixed via https://github.com/graphhopper/graphhopper/commit/882d1e19954431a5b14b081fc8de068bf2eb7d49
On master branch I get due to the empty
snapped_waypoints
:The old behaviour was an empty string for points_encoded=true (already is) and
{"coordinates":[],"type":"LineString"}
for false.