I have an
SDE.ST_GEOMETRY polygon FC in an Oracle 18c/10.7.1 geodatabase.
I can calculate the X and Y of the polygon centroids using the
SDE.ST_GEOMETRY ST_Centroid function:
sde.st_x(sde.st_centroid(shape)) as x, sde.st_y(sde.st_centroid(shape)) as y
ST_Centroid takes a polygon, multipolygon, or multilinestring and returns the point that is in the center of the geometry's envelope. That means that the centroid point is halfway between the geometry's minimum and maximum x and y extents.
Unfortunately, the polygons are irregularly shaped, and therefore the centroids do not fall within the polygon boundaries:
Is there a way to calculate polygon center-points that fall within the polygons?