A working python conversion script for Michigan DNR data to the Open Trail specification
- Clone the repo
git clone git@github.com:trailheadlabs/MIDNRToOpenTrails.git
- Ensure you have Python 2.7+ installed by running
python --version
- Install Python 2.7+ if not already installed.
- Install dependencies by running
pip install -r requirements.txt
- Copy latest marquette_pilot_open_data.zip to input directory
- Run
python MIDNRToOpenTrails.py
- A new MI_DNR_OpenTrails.zip will be placed in the output directory. Enjoy!
Order of operations
- Unzips input files (stewards.xls, named_trails.xls, trailheads and trail_segments shapefiles)
- Reads input files (into memory)
- Builds OpenTrails compliant data structures in memory
- Writes data structures to OpenTrails files (stewards.csv, named_trails.csv, trailheads.geojson, trail_segments.geojson)
- Creates simplified versions of the trail_segments.geojson file, using the rdp package.
- Zips files in output directory into MT_DNR_OpenTrails.zip
- Does not include areas.geojson