Skip to main content

Calculate Open Street Maps road length for any polygon

Project description

OSM Road Length

A tool to get the highway length from Open Street Maps of a region using Python.

It supports any region size and shape.

Installing

pip install osm-road-length

Using

Import It

import osm_road_length

Get length from geometry

from shapely import wkt

geometry = wkt.loads('POLYGON((-43.2958811591311 -22.853167273541693,-43.30961406928735 -23.035275736044728,-43.115980036084224 -23.02010939749927,-43.157178766552974 -22.832917893834313,-43.2958811591311 -22.853167273541693))')

length = osm_road_length.get(geometry)

Credits

  • Free software: MIT license

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.5 (2020-04-22)

  • Add simplify method

0.1.0 (2020-04-21)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osm-road-length-0.1.5.tar.gz (12.5 kB view details)

Uploaded Source

File details

Details for the file osm-road-length-0.1.5.tar.gz.

File metadata

  • Download URL: osm-road-length-0.1.5.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for osm-road-length-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8864ea011f39fe11c83651e51a25fdafd956a7b9d755c5fd884bc75d6756d487
MD5 be325e667335db7b8359440142f68a34
BLAKE2b-256 0835e253038919beb3e460089e3c146e51918b3973a2d7cf9e049127b71e48e2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page