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
osmRoad-0.2.tar.gz
(3.5 kB
view details)
Built Distribution
osmRoad-0.2-py3-none-any.whl
(6.3 kB
view details)
File details
Details for the file osmRoad-0.2.tar.gz
.
File metadata
- Download URL: osmRoad-0.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c6816cba89a6a830ec1e5adaa7776b3477b35977c51b7df4f9b2dc8cccfe456 |
|
MD5 | b1debe0ec37c8a2f0c64adcd57e6f694 |
|
BLAKE2b-256 | c219747f5c8a60fbf112a94eb4ca772b28d9724cb360287a4be1013485333b51 |
File details
Details for the file osmRoad-0.2-py3-none-any.whl
.
File metadata
- Download URL: osmRoad-0.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a4f862211a7d6301cc27393e39737e7f054ec46cbd6a23490fd348e7bfd4dfc |
|
MD5 | c22f032e8755595ff65d76428c752713 |
|
BLAKE2b-256 | f2e0d2b5ce7460702b651ed27e7fadef39f086bf98b56593013c92f514d97c77 |