开发者

Building graph structure from GIS data in Python

I want to 开发者_运维问答implement a driving direction in Python using something like Djikstra's shortest path. The algorithm requires the data to be represents in graph structure. Raw GIS data (e.g. shape files or OpenStreetMap data, however, represent their data differently. Therefore, I was wondering is there any Python library that can convert GIS data to graph structure?

In Java I found that GeoTools has exactly what I described. Is there any similar library in Python?


Haven't used it yet, but there's a function that generates directed graphs from shapefiles in Networkx: http://networkx.lanl.gov/reference/readwrite.nx_shp.html. If it doesn't do exactly what you need, it might suggest a solution. Uses OGR's Python bindings to read data.

See also Graphserver http://bmander.github.com/graphserver/.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜