Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- form fiona import collection
- form shapely.geometry import mapping, shape
- with collection(path_in, "r") as input:
- schema = input.schema.copy()
- with collection(path_out, "w", "ESRI Shapefile", schema) as output:
- list = []
- for f in input:
- list.append(shape(f['geometry']))
- do stuff with shapely
- output.write({'geometry': mapping(somethingIDid), 'properties':{'somethingFromSchema':'somethingToMakeThisValid'}})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement