1

SDE.ST_GEOMETRY; Oracle 18c; 10.7.1 EGDB


How many vertices does a SDE.ST_GEOMETRY rectangle have?

(Drawn using the rectangle construction tool in the Create Features pane in ArcMap 10.7.1.)

enter image description here

enter image description here


The reason I ask:

The Edit Sketch Properties window suggests that there are only four vertices.

But is that misleading? Might there actually be five vertices?

2
  • 1
    Although "vertex" and "point" are commonly used interchangeably, they are not the same entity in mathematics. You don't have to take my word for it, check the definitions on a site like Wolfram MathWorld: The Web's Most Extensive Mathematics Resource. A rectangle has 4 vertices, and a rectangle is represented by 5 points in the geometry object model as defined in the Simple Feature Access - Part 1: Common Architecture | OGC. The "extra" point in the geometry model is needed to close the linestring to make a linearring.
    – bixb0012
    Jun 8, 2022 at 21:24
  • Your Question asks two different questions. The title asks what the ST_GEOMETRY datatype stores, and the body asks if ArcObjects models sketch polygons so the closing vertex can't be moved. These are of course different. If you access the Geometry.pointCount of that shape, it will return 5. Shapefile also stores five points for a rectangle, as does file geodatabase, and the low-level SgShape library used in common by all Esri tools does as well, so the sketch interface is an outlier.
    – Vince
    Jun 8, 2022 at 21:24

1 Answer 1

2

It looks like the rectangle actually has five vertices:

--SQL Query:
select
    (shape).numpts
from
    my_polygon_fc


(SHAPE).NUMPTS
--------------
             5

My guess at an explanation:

There needs to be a final vertex that closes the polygon. In order to do that, the last vertex needs to be exactly the same as the first vertex. As such, a rectangle would actually have five vertices, including a redundant closing vertex.

I think ArcMap hides the fifth vertex, since we don't need to see it for editing purposes. The user doesn't actually need to create that vertex—ArcMap does it for us.

Would be happy to hear a more authoritative answer on this.

3
  • 2
    I suggest to read the standard "OpenGIS Implementation Standard for Geographic information - Simple feature access - Part 1: Common architecture". Polygons are defined to be constructed from closed linestrings having start point = end point. So you have five vertices but only four distinct vertices. I would say that there are 4 logical vertices because you cannot make an edit that breaks the start point apart from the end point or the ring would be broken. However, usually that geometry is stored with 5 vertices into some format that computers understand.
    – user30184
    Jun 8, 2022 at 20:46
  • 1
    Read also the other part "OpenGIS Simple Features Specification For SQL" that defines the SQL function NumPoints. It is only defined for linestrings. Polygon has one or more closed rings and therefore NumPoints on polygons sort of adds one vertex for each ring in a polygon because it is first exploded into rings.
    – user30184
    Jun 8, 2022 at 21:01
  • Since this question and discussion is focused around ST_Geometry and OGC Simple Feature Access standard, we should be talking points and not vertices. Out of the 200+ pages of both OGC SFA parts, the terms vertex and vertices are used 3 times while the terms point and points are used several hundred times. It isn't coincidence that Esri never uses the term vertex with ST_Geometry.
    – bixb0012
    Jun 19, 2022 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.