Repository navigation
Simplify entire edges on import instead of just pillar nodes - #1943
Conversation
| assertEquals("keep left onto Eyblparkstraße", il.get(10).getTurnDescription(tr)); | ||
| assertEquals("keep left onto Austraße", il.get(11).getTurnDescription(tr)); | ||
| assertEquals("keep left onto Rechte Kremszeile", il.get(12).getTurnDescription(tr)); | ||
| assertEquals("keep left onto Hoher Markt", il.get(4).getTurnDescription(tr)); |
There was a problem hiding this comment.
instruction 4 that went away was "continue onto Margarethenstraße"
| assertEquals(30, il.size()); | ||
| assertEquals("continue onto Avenue des Guelfes", il.get(0).getTurnDescription(tr)); | ||
| assertEquals("continue onto Avenue des Papalins", il.get(1).getTurnDescription(tr)); | ||
| assertEquals("turn slight left onto Avenue des Papalins", il.get(1).getTurnDescription(tr)); |
There was a problem hiding this comment.
these changes are probably because by forcing simplification to always keep the closest pillar node to each tower node, we had been getting a bit more resolution on the angles into and out of each intersection.
karussell
left a comment
There was a problem hiding this comment.
This sounds too good to be true: less code and smaller geometry. Really nice!
Will have to test it in the next days and also go through the tests like you said.
| iter.setWayGeometry(pillarNodes); | ||
| // If the entire way is just the first and last point, do not waste space storing an empty way geometry | ||
| if (!pointList.isEmpty()) | ||
| iter.setWayGeometry(pointList); |
There was a problem hiding this comment.
at first I was creating a shallow copy excluding first and last points, but then I tried this approach of removing the first and last point as part of simplification and it was consistently faster than the shallow copy approach on a medium size ~1GB extract (US northeast)
There was a problem hiding this comment.
alright, looks like that wasn't safe because it needs to remove first and last point whether you simplify or not.
|
Thanks again! |
Fix #1353 by simplifying whole edge geometries instead of just the pillar nodes. Since only edges with more than one pillar node remaining are stored in edge geometries, this ends up reducing edge geometry file size by 15-20%
This did result in some churn in the integration tests, please take a close look at those and let me know if they look OK. It also removed a case to not calculate edge distances on edges that cross the international date line - this didn't seem necessary since that code uses DistanceCalcEarth which handles these crossings correctly but let me know if I'm missing something.