graphhopper: Test data contain invalid geometries
countries.geo.json
contains self-intersecting Multipolygons, which is illegal. GeoJSON obviously doesn’t care about that, but JTS doesn’t accept them, and neither would e.g. PostGIS.
I would suspect that the tool which was used to simplify the geometry didn’t care about topology.

This is a bit mean because it prevents me from experimenting with standard geometric algorithms. ,-)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 20 (20 by maintainers)
Fixed by #2188
https://www.jasondavies.com/simplify/koch/
Ok, I did a speed comparison for importing Germany.
With the current master and the minified geo.json it took 8:50 minutes until the server started. Using the original geo.json it took 14:23. As I could not believe the result, I reran it with a similar result.
When looking closer the time consumption is mostly created by way parsing, which makes sense. With the minified geo.json it takes 3:08 minutes to parse the ways. With the original geo.json it takes 8:38.
I have another branch where I took the Jackson-stuff further, replaced GraphHopper-
Geometry
with JTS-Geometry
to automatically deserialize them, and noticed that JTS says those aren’t validMultiPolygon
s.Also JTS contains simplifiers ensuring that results are valid geometries.