open-reblock / localco.de

http://beta.openreblock.org
3 stars 2 forks source link

Explode shapefile on upload #19

Closed danrademacher closed 9 years ago

danrademacher commented 9 years ago

to facilitate barrier selection, we need to break up all submitted shapefiles into their constituent line segments so it matches the indices of the graph that will be created.

brelsford commented 9 years ago

I think that the process here is to send the shapefile to topology, run the import/cleanup command from topology, have topology send back a geoJSON (which is stored as line segments) to the UI, and then have the user define barriers from that geoJSON, which can be sent back to topology.

cesandoval commented 9 years ago

I think so too Christa. Do you have a code snippet that we can use for the path computation with barriers?

brelsford commented 9 years ago

I'll write an example file for you now. The sad part I realized yesterday is that a shortcut I've been using to do the computation without barriers does work when there are barriers, so the code will run a lot slower for big blocks.

brelsford commented 9 years ago

it's here:

https://github.com/open-reblock/topology/blob/master/Barriers_example.py