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?

  • do you want to move all the points by a fixed offset or does it vary by point? – Ian Turton Aug 6 '13 at 10:19
  • 1
    It varies by point. – Leonidas Aug 6 '13 at 11:09
  • Did you see this? gis.stackexchange.com/questions/21256/… – klewis Aug 6 '13 at 14:00
  • Yes, but in my case the shift is different for each vertex. – Leonidas Aug 6 '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 6 '13 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.