Skip to content

Instantly share code, notes, and snippets.

@rohan
Created December 21, 2017 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohan/11a8d0a4e9b32da6877fb7956522b863 to your computer and use it in GitHub Desktop.
Save rohan/11a8d0a4e9b32da6877fb7956522b863 to your computer and use it in GitHub Desktop.
import fiona # pip3 install --user fiona
from shapely.geometry import shape # pip3 install --user shapely
with fiona.open("filename.shp") as f:
for shp in f:
s = shape(shp.get('geometry'))
# do something with s
# see https://shapely.readthedocs.io/en/latest/ for details on shape objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment