Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. form fiona import collection
  2. form shapely.geometry import mapping, shape
  3. with collection(path_in, "r") as input:
  4. schema = input.schema.copy()
  5. with collection(path_out, "w", "ESRI Shapefile", schema) as output:
  6. list = []
  7. for f in input:
  8. list.append(shape(f['geometry']))
  9. do stuff with shapely
  10. output.write({'geometry': mapping(somethingIDid), 'properties':{'somethingFromSchema':'somethingToMakeThisValid'}})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement