How do you calculate the z-coordinate of the shape from another field using ArcGIS 10.3? The feature class geometry is Point Z and the field containing z-values is Double.
If you wanted to just update the Z-Values of your existing feature instead of generating a new feature class using Feature to 3D By Attribute. You could use a quick update cursor like this:
with arcpy.da.UpdateCursor(Input_Feature,["SHAPE@Z",ZField]) as update:
for row in update:
If the shape field is z-enabled, then you should be able to extract that data using the field calculator
plus tools from arctoolbox
The Adjust 3D z goes the other way.
The first part just extracts, I need to assign the z-values to the shape geometry.
The Adjust 3D Z tool does not appear to accept a field name, only a number value.
feature-to-3d-by-attribute is the only one that uses a field.
That does populate the z-values but also creates a new FC. That could work if I could replace the shapes in the original FC with those from the new FC.
The FC is stored in SQL server with geometry type. Maybe I can modify the shape through there?
Luke Sturtevant wrote: If you wanted to just update the Z-Values of your existing feature instead of generating a new feature class using Feature to 3D By Attribute. You could use a quick update cursor like this:
Luke Sturtevant wrote:
That works great. I haven't worked much with arcpy myself. Thank you.
If you need some more help implementing the code just let us know. Thanks.
Retrieving data ...