[GIS] Getting z-Value from xy-Values within IPolygon using ArcObjects

arcgis-10.0arcobjects

How can I get the z-Value of given xy-Values within an IPolygon?

I have an IPolygon, which is zAware. For given xy-Values I want to get the z-Value of the Polygon-Shape. What I want to do is something like intersecting the Polygon with an vertical line and getting the Intersecting Point.

Has anyone an idea how to do something like this?

Best Answer

There is no Inbuilt way to do this. A z-aware polygon, is fundamentally not 3 D in itself. What is Z Aware are the vertices. So for a point inside the polygon (i.e. inside in the sense of X-Y domain) no Z value is defined.

(If you having problems, visualizing this, imagine a z aware polygon that does not lie in one plane. Some points are on that plane, some above and some below. For this polygon, only the vertices have a defined z value, and not any points in the interior.)

So you can proceed in several ways:

  1. If you are assuming that the vertices are sort of spot heights, then the inside of the polygon is the surface in between the points is the 3 dimensional surface which is defined by these spots heights.
  2. Another way would be to convert this geometry into a Multipatch, where the surfaces are defined as triangles. There you can find the z value at any point.