I've got a polygon feature class with Z values enabled. The polygon entities represent billboards. I'm looking for a way to measure the front surface area of this entities - i.e the area of the billboards from one side.
Can I do this using a Geoprocessing tool?
Some snapshots
Polygon in ArcMap
Polygon in ArcScene
Answer
First, copy and paste the defs in the accepted answer of the post that you mentioned to the python interpreter of ArcMap. And then run a cursor on the shapes to calculate the 3D area, such as:
for row in arcpy.SearchCursor("Billboard Layer on My Table of Content"):
area_array=[[j.X,j.Y,j.Z] for i in row.Shape.getPart() for j in i]
print row.OBJECTID, area(area_array)
This routine just prints the ID and the area of the feature but it can be used to record areas into a new field as well by UpdateCursor
. Intentionally, I have exemplified the old cursor approach, otherwise there are much more efficient utilities in arcpy's data access
module (i.e., arcpy.da
)
No comments:
Post a Comment