# Check if a polygon is at one elevation

I have a polygon (pond) and I need to ensure it is at one elevation. I have converted all vertices of the polygon to points, used summary statistics to determine the range in elevations and if the range is greater than 0, it indicates there is a discrepancy in elevation values. I do not have spatial analyst or 3D analyst. Is there an easier way or code to do this in ArcGIS? I received this layer from a fellow employee that extracted the data from a LiDAR point cloud using MicroStation. Therefore, I do not have the original elevation (raster) layer, just a shapefile that has elevation values attached to the vertices. I am looking for a way to identify a polygon whose vertices have different elevation values. Each polygon should have one elevation value associated with each vertice. For example, Polygon A should have a 120m elevation value for each vertice in the polygon. I am looking for something to check if the vertices are different.

• What attribute are you calculating the range on? Does they polygon have a z value? Nov 10, 2014 at 16:53
• Your question has been asked before The intersect point with raster tool is this one: spatialecology.com/gme/isectpntrst.htm Previous answers gis.stackexchange.com/questions/28298/… Nov 10, 2014 at 17:38
• I used ET Geowizards to convert the vertices to points. A field called ET_Z shows the elevation values. Nov 15, 2014 at 16:29

This works without SA or 3D

``````import arcpy, traceback, sys
##, numpy
from arcpy import env
env.overwriteOutput = True

pntFile=arcpy.GetParameterAsText(0)
rasters=arcpy.GetParameterAsText(1)
rasters=rasters.split(';')
theFields=arcpy.ListFields(pntFile)
theFields=[x.name.lower() for x in theFields]
result=arcpy.GetCount_management(pntFile)
nF=int(result.getOutput(0))
p=arcpy.Point()
try:
def showPyMessage():
arcpy.AddMessage(str(time.ctime()) + " - " + message)
for raster in rasters:
desc=arcpy.Describe(raster)
theFLD=raster.lower()
if not(theFLD in theFields):
arcpy.SetProgressor("step", "", 0, nF)
with arcpy.da.UpdateCursor(pntFile,("SHAPE@XY",theFLD)) as rows:
for row in rows:
XY=row[0]
p.X,p.Y=XY
myArray = arcpy.RasterToNumPyArray(raster,p,1,1,-9999)
row[1]=myArray[0,0]
rows.updateRow(row)
arcpy.SetProgressorPosition()
del row,rows