These in-development tools will allow park agencies and other trail stewards to upload and transform their existing shapefile data describing trail systems--including trail segments, trailheads, and the areas they traverse--into OpenTrails-compliant GeoJSON and CSV files.
The converter tool currently transforms shapefiles containing trail segment data (lines), producing:
trail_segments.geojson
named_trails.csv
stewards.csv
Future functionality will provide a similar transformation for shapefiles describing trailheads (points) and areas (polygons).
OpenTrails is a Python Flask application that depends on Amazon S3 for storage of uploads.
-
Amazon Web Services configuration comes from the
DATASTORE
environmental variable, given in this form:s3n://<AWS key>:<AWS secret>@<S3 bucket name>
-
Set up a virtualenv
pip install virtualenv
virtualenv venv-opentrails
source venv-opentrails/bin/activate
- Install the required libraries
$ pip install -r requirements.txt
python tests.py
OpenTrails uses a Procfile to get up and running. You can use a library like foreman or honcho to run the application locally.
foreman start
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright 2014 Code for America, MIT License