CityofSantaMonica / mds-provider

Python tools for working with MDS Provider data
https://github.com/openmobilityfoundation/mobility-data-specification
MIT License
18 stars 20 forks source link

Resolve key error #63

Closed genhernandez closed 5 years ago

genhernandez commented 5 years ago

Update to_feature to return the expected object

According to http://geojson.org/, the Feature geojson expects that coordinates be nested under geometry. to_feature was originally creating objects where the coordinates were not nested, leading to KeyErrors when extract_point is called.

Also updated extract_point to use the shapely function shape to convert the object to a shapely Point instead of pulling the coordinates out unnecessarily and then creating a Point.