# Documentation: Hierarchical structure of ArcPy Geometry class

735
3
02-05-2022 03:07 PM
Labels (1)
by
Notable Contributor

In the ArcPy Geometry Class documentation, could ESRI provide more detailed information about the hierarchical structure of gemetries?

For example, provide a hierarchical diagramkind of like we have for the SDE.ST_GEOMETRY spatial type, but for the ArcPy Geometry class:

```Like this, but better: - Geometry
- PointGeometry
- Multipoint
- Point
- Polygon
- Ring (aka part)
- Point
- Polyline
- Path (aka part)
- Point```

That would help people who are trying to learn ArcPy understand how to access the various levels of the Geometry class.

• I know there is some info about that in the Cursor docs. But it doesn't explain the hierarchical structure of geometries.

For example, as a novice, it was difficult to know how to iterate through a Polyline's components — to get at the individual points/vertices within a feature-part:

`import arcpyconnection = "Database Connections\my_conn.sde"feature_class = connection + "\my_owner.my_fc"with arcpy.da.SearchCursor(feature_class, ["SHAPE@","OID@"]) as cursor:    for row in cursor:        geometry = row[0]        print("Geometry/Polyline: {}".format(row[1]))        for i, part in enumerate(geometry):            print(" Part: {}".format(i))            for j, point in enumerate(part):                print(" Point: {}".format(j))>>> Geometry/Polyline: 100  Part: 0    Point: 0    Point: 1    Point: 2    Point: 3    Point: 4  Part: 1    Point: 0    Point: 1`

It would help a lot if if we could get some more detailed information about the hierarchical structure.

Thanks.

by

Hi @Bud, there is some discussion about geometry structure in this topic: https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/reading-geometries.htm

Is this sufficient, or is there more information you'd like to see?

by

Yes, now I realize that the Geometry class isn't as hierarchical as I originally thought. So I think the link you mentioned is sufficient.

Thanks.