Now—at least in case of multipatch inputs—the result is planar. I’d like to see results like points created by arcpy.PointGeometry.centroid and/or arcpy.PointGeometry.trueCentroid.
Let’s imagine a triangle in a Cartesian (projected-) coordinate system, with the following coordinates: A(1, 1, 2), B(3, 1, 2) and C(1.5, 3, 2) where the fist number of the coordinate is measured in metes, along the X axis, the second number is measured along the Y axis, and the third one measured along the Z axis. The order of the coordinates is counter clockwise. Actually, the Z value is constantly 2 for all the points. How can we calculate the centroid of this polygon (triangle)? CentroidX= (AX+BX+CX)/3; CentroidY=(AY+BY+CY)/3; CentroidZ=(AZ+BZ+CZ)/3. The results are the following: Centroid(1.833333, 1.666666, 2). This coordinate point is inside, on the plane of the triangle. If I use the Feature to Point against this triangle the result is Centroid(1.833333, 1.666666, NaN), where the “NaN” means “Not a Number” (it represented as 0 on the user interface). The result in the XY plane is correct, but the Z coordinate is missing (or zeroed). In this case the output feature class is technically z aware, but there is no Z information inside. In arcpy the Polygon.centroid() function calculates the correct Centroid(1.833333, 1.666666, 2) value. It would be beneficial if the results would be the same. I think the algorithm of the “Feature to Point” was written before the introduction of the idea of Z aware feature classes.
Hi Akos,
Where would the Z value come from? Is there an attribute with a Z value, or would you expect it to be derived from a surface?
Would either of these tools accomplish what you're looking to do?
Feature To 3D By Attribute—Help | ArcGIS Desktop
Interpolate Shape—Help | ArcGIS Desktop
I wasn’t precise enough… Technically it can produce 3D output and it does produce 3D output. However the Z values of the vertices is fulfilled with zeros (at least in case of multipatch and multipoint inputs). Which is not exactly 3D any more if the input features are several thousand feet above the reference surface. But yes, technically it is 3D. So it is already offered, but it’s never implemented and never going to be implemented. (Reading about something in a manual is helpful, but not enough. Someone have to try it in the reality)
Thanks to Duncan Hornby for providing that response. I was going to respond with this: Feature To Point—Data Management toolbox | ArcGIS Desktop and in addition to what Duncan wrote, there is also a Default Output Z Value (Environment setting)—Geoprocessing | ArcGIS Desktop
This idea will be marked as Already Offered.
The Feature to Point can produce Z aware FeatureClasses. It is an environment setting "Output has Z values".
Sign in to post, follow content, and more. New here? Register for free.