Skip to content

schnerd/sharedstreets-python

 
 

Repository files navigation

SharedStreets (Python)

This fork has utilities for turning SharedStreets event tiles into geojson.

See https://github.com/sharedstreets/sharedstreets-python for source project README.

Setup

  1. Clone this fork

     git clone git@github.com:schnerd/sharedstreets-python.git
     cd sharedstreets-python
    
  2. Prepare a Python virtual environment running Python 3.

  3. Install the sharedstreets module, keeping it editable

    pip install --editable .
    
  4. Install shapely dependency

    pip install shapely
    

Use

Convert events tiles to geojson file

If you just ran the SharedStreets matcher, chances are you ended up with tiles containing SharedStreetsWeeklyBinnedLinearReferences. You can use events-to-geojson.py to convert the output .events.pbf tiles to a geojson file, suitable for visualization in kepler.

python events-to-geojson.py [input_path] [output_file]

For example:

python events-to-geojson.py ../event_tiles ./events.geojson

Other scripts

events-aggregate.py can be used to convert SharedStreetsWeeklyBinnedLinearReferences to SharedStreetsBinnedLinearReferences.

events-filter.py can be used to filter out non-desirable event types from tiles.

About

SharedStreets (Python)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%