perliedman / geojson-path-finder

Find shortest path through a network of GeoJSON
https://www.liedman.net/geojson-path-finder/
ISC License
298 stars 85 forks source link

Support topojson? #20

Open josiekre opened 7 years ago

josiekre commented 7 years ago

Have you thought about supporting topojson? It would mean using pre-specified topology from topojson. I use topojson a lot, and I'd prefer to calculate the shortest paths based on the topology building algo there.

perliedman commented 7 years ago

That does indeed make a lot of sense. I seem to remember looking into TopoJSON when I started the project, but don't remember why I decided against it.

In principle, I don't see any issue with using TopoJSON, all the information GeoJSON Path Finder needs should definitely be there. The main issue I see is with TopoJSON's alternative coordinate format (IIRC it uses some form of compressed coordinates): GeoJSON Path Finder needs to access the edges' coordinates directly in some places, and would need to be adapted to TopoJSON's alternative format.

This is not something I'm likely to take on myself at this point, but I would be happy to help out answering questions if this is something you would be interested in adding.

josiekre commented 7 years ago

Thanks for the reply. I'll think about extending your work for topojson if I cannot find a solution already. I've only begun digging around.