I would like to find a way to edit shapefile (polyline) coordinate data using python. Basically, I want to edit all the z-coordinates in my shapefile so that they are 1 metre lower than they previously were.
I noticed that coordinate data can be manipulated en masse in the Esri Python tutorial video (https://www.youtube.com/watch?v=ge_U_w0PcFM, at 18:17 for anyone thats interested). They use a function within the field calculator to move all the x coordinates +5000m. I have reproduced the script below:
def shiftXCoord(Shape) point = shape.getpart(0) point.X point.X + 5000 return point shiftXCoord(!Shape!)
I am experiencing two main problems using this script as a solution to my problem. (1) The commentators do not go into any great detail about what particular parts of the script mean/are used for. I know the above is a function but I do not know what lines 2 and 3 represent. (2) Also, without the field calculator I am unsure as to how to link this to the shapefile I am working on.
I am using ArcGIS Desktop 10.0.