Parse OSM Data
Project description
Summary
Process OSM data with python 3. This project is mainly motivated by openstreetmap.
Dependencies
Install
You can install osmRoad via pip
.
pip install osmRoad
Usage
from osm import parser
from osm import road
parser
load_parse_osm
: returnbounds
,nodes
,ways
load_parse_osmxy
: different from above, returnnodes
with coodinates
road
extract_connectivity
: return the adjecent matrixlil_matrix
(without weights)extract_adj
: return the adjecent list (without weights)extract_edges
: return the edges (without weights)build_graph
: return agraph
innetworkx
(with weights)
Example
parsed_osm = parser.load_parse_osmxy(r"osm/Beijing.osm")
r = road.build_graph(parsed_osm)
print(nx.dijkstra_path(r, 296314321, 296314277))
parsed_osm = parser.load_parse_osm(r"osm/Beijing.osm")
m = road.extract_adj(parsed_osm)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for osmRoad_nadfity-0.2.1a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e297e5f9b3268afa6452ca5b6d48d65a6bc94f0dc6e15109050b9f19f31a0f06 |
|
MD5 | e37a2103f18abad272f518cede55febc |
|
BLAKE2b-256 | d4bbdf3e38de7dfa509c2dd26464a3b488566cafb6f055a0b2468dc8b87a5317 |