I need to shift each vertice of shape in a shapefile (of any type:point, line, polygon, multiline etc.) with Python. I need to loop in all shapes, get the vertices, get it's coordinates and for each X,Y update with new values. Which Free and Open Source Software (FOSS) library should I use (ogr, fiona shapely etc.)? Any example?
Asked
Active
Viewed 402 times
1
-
do you want to move all the points by a fixed offset or does it vary by point? – Ian Turton Aug 06 '13 at 10:19
-
1It varies by point. – Leonidas Aug 06 '13 at 11:09
-
Did you see this? http://gis.stackexchange.com/questions/21256/how-to-easily-shift-all-features-in-a-vector-dataset – klewis Aug 06 '13 at 14:00
-
Yes, but in my case the shift is different for each vertex. – Leonidas Aug 06 '13 at 14:18
-
Then adapt any of those examples to the case of spatially varying shift. Maybe update your question to show how the shift varies? – sgillies Aug 06 '13 at 18:31