Skip to main content

pychrone

Python 3 module for generatings isochrones from point

How to install

You can install python-digitalocean using pip

pip install -U pychrone

or via sources:

python setup.py install

If you have serveral python versions installed you will probably use pip3 and python3 commands accordingly.

Features

This module generates walking isochrone from the set point with defined latitude and longtitude with defined time.

All details of walking routes and coordinates are from OpenStreetMap, so you will need an internet connection for this module to work.

Also module will try to optimize isochrone shape with α-shape algorithm to make it more natural and clean.

Main function of module takes the following arguments:

Create_isochrone(longtitude, latitude, speed=4.5, output="geojson")

  • longitude - longitude of point to create isochrone from;
  • latitude - latitude of point to create isochrone from;
  • speed - pedestrian speed in km/h, default is 4.5;
  • output - output format, default is "geojson", wich generates valid GeoJSON polygon. Other option is "shape", that generates Shapely object.

Usage:

In this small example module will return 5-minute isochrone from point with coordinates (37.847591, 55.920284) in GeoJSON format assuming pedestrian speed as 4.5 km/h.

IN:

from pychrone import Create_isochrone

Create_isochrone(37.847591, 55.920284, 5)

OUT:

{"coordinates": [[[37.8460729, 55.9174363], [37.8464059, 55.9175894], [37.847672, 55.9178994], [37.8485452, 55.9179112], [37.8489915, 55.9179172], [37.8490785, 55.9179534], [37.8502528, 55.918252], [37.8508537, 55.9190215], [37.8521326, 55.9193121], [37.8523401, 55.9195966], [37.8523826, 55.9196535], [37.8526471, 55.920433], [37.8527015, 55.9206193], [37.852584, 55.9210867], [37.8512857, 55.9218685], [37.8500913, 55.9216824], [37.8481064, 55.9218883], [37.8480311, 55.9218827], [37.8464856, 55.9216235], [37.8458339, 55.9220129], [37.8452347, 55.9223078], [37.8451153, 55.9223076], [37.843753, 55.9214498], [37.8434385, 55.9211565], [37.8432352, 55.9210091], [37.843344, 55.9201537], [37.8436392, 55.9200188], [37.8442215, 55.9195563], [37.8445491, 55.9189478], [37.8453806, 55.9179848], [37.8458505, 55.9173872], [37.8460729, 55.9174363]]], "type": "Polygon"}

Download files

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

Source Distribution

pychrone-0.0.1.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file pychrone-0.0.1.tar.gz.

File metadata

  • Download URL: pychrone-0.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pychrone-0.0.1.tar.gz
Algorithm Hash digest
SHA256 db7ed82a0e6cf325da6c7c0a08905a107eada4b8db0da8eabf529ab49fa6936f
MD5 813ed8c9dd714eb1a226f7c6fa1caac9
BLAKE2b-256 8bfa06ce7641335e90ab0718a4eaf2d62ddef2a2e11e65a766471c6d2af3ba9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page