I have an Address Points layer that is Z enabled and my DEM for the surface. I want to take all of the points that belong on the second floor of a building and calculate the Z geometry value (not in the attribute table) to be the same. Example- the first floor is 1115 feet and the second floor is 1125 feet so every Address Point on the second floor should have Z = 1125. Currently my points all have the Z equal to the DEM pixel value where they sit. I know the "Adjust 3D Z" geoprocessing tool exists, but it only allows me to incrementally adjust the height, so I could add 10 feet to all of my points. That doesn't help if the starting Z values are different for every point. It would be very tedious to select each point and go to "Attributes" then to the "Geometry" tab and type in 1125 for every point. Is there any way to change the Z geometry value for multiple points at one time?
Solved! Go to Solution.
@SeanSummers_CC You can use the Move To tool (found on the Edit tab on the ribbon > Modify Features pane). Open it up > select the points > choose the Absolute method and set the Z you want and click Move To.
The tool should respect selections, so you could do a select by attribute on the floor value (I assume that's an attribute) to grab all the second floor points, and use the tool to only update those selected points. Then select floor 3 and repeat... Could probably automate that in Model Builder if you have a lot of floors.
Yes, I can select all the points that belong on the second floor... how do I change the multiple points that currently have different Z geometries to all be the same 1125 feet? If I have point 1 z = 1115', and point 2 z = 1116', point 3 = 1118', point 4 = 1112', point 5 = 1111' etc. Adjust 3D Z tool only allows me to add or subtract a number from the current Z value. I am looking for a way to make multiple points the same absolute value.
Oh, sorry, I misunderstood the problem.
One thing you might do is use the building footprints to make a surface (say a TIN, or a fine scale raster) where you could get the mean value (or some absolute specified value) of cells in the footprint and set the z-values to that. Then all points in the building would start with the right base height and you could adjust up or down by floor as described above.
With some code, it's very easy.
This is written for points, specifically.
# Get the Layer we care about
aprx = arcpy.mp.ArcGISProject("CURRENT")
mp = aprx.activeMap
lay = mp.listLayers("Layer I care about")[0]
# This SQL assumes you have an attribute denoting the floor.
# Otherwise, just make your selections manually and then run this code with sql as None.
sql = "Floor = 'Second'"
# For each record in the table, get the shape.
with arcpy.da.UpdateCursor(lay, ["SHAPE@"], where_clause = sql) as cursor:
for row in cursor:
# Get the X and Y coordinates of the original shape,
# then overwrite it with a new Z value.
origPoint = row[0][0]
x = origPoint.X
y = origPoint.Y
#z = origPoint.Z
row[0] = arcpy.Point(x, y, 1500)
cursor.updateRow(row)
I did have some issues manually editing after doing this. Close and reload Pro or re-add the data and it should be fixed, otherwise use the "Move" tool to take care of it.
Thank you for the script. That works, but takes some technical expertise a lot of people don't have.
@SeanSummers_CC You can use the Move To tool (found on the Edit tab on the ribbon > Modify Features pane). Open it up > select the points > choose the Absolute method and set the Z you want and click Move To.
This was what I was looking for! Thank you!