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.
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 whenextract_point
is called.Also updated
extract_point
to use the shapely functionshape
to convert the object to a shapely Point instead of pulling the coordinates out unnecessarily and then creating a Point.