1

Is the polygon pictured below compliant with the OGC Simple Feature standard?

There are two interior boundaries that share a segment so intuitively I would say it is not but I have not been able to find any confirmation in the documentation (in the 1.2.1 version, polygon is described on pages 26-28).

There are "rules that define a valid polygon" and I don't see there anything that would exclude polygons whose interior boundaries touch, but I also don't understand why, based on those rules, are some of the example polygons in Figure 12 invalid so I must be missing something.

Polygon

  • 1
    6.1.11.1(c) rejects this configuration ("nearby points cannot be common") – Vince Nov 7 '18 at 5:07
  • Ok, so according to this, they could share a vertex because then the nearby points would not be common? So, how come in the figure 12, the first example shows a polygon where boundaries only touch (but cannot be represented as a polygon)? Thanks! – Jan Pisl Nov 7 '18 at 7:38
2

I would say that rings which share a segment are denied by the rule 6.1.11 c)

No two Rings in the boundary cross and the Rings in the boundary of a Polygon may intersect at a Point but only as a tangent.

Inner rings which touch at one point (intersect as a tangent) is OK.

POLYGON (( 0 0, 0 5, 6 5, 6 0, 0 0 ), ( 2 2, 3 2, 3 4, 2 4, 2 2 ), ( 3 2, 3 1, 4 1, 4 2, 3 2 ))

enter image description here

Case when inner rings intersect along a line and thus have an infinite number of common points is not OK.

POLYGON (( 0 0, 0 5, 6 5, 6 0, 0 0 ), ( 2 2, 3 2, 3 4, 2 4, 2 2 ), ( 3 3, 3 1, 4 1, 4 3, 3 3))

enter image description here

The right way to express the above is to combine the inner rings

POLYGON (( 0 0, 0 5, 6 5, 6 0, 0 0 ), ( 2 2, 3 2, 3 1, 4 1, 4 3, 3 3, 3 4, 2 4, 2 2 ))

enter image description here

Test with PostGIS and rings touching at one point:

select ST_IsValidReason(ST_GeomFromText('POLYGON (( 0 0, 0 5, 6 5, 6 0, 0 0 ), ( 2 2, 3 2, 3 4, 2 4, 2 2 ), ( 3 2, 3 1, 4 1, 4 2, 3 2 ))'));
    Result: Valid geometry

Test with PostGIS and rings intersecting along a line:

select ST_IsValidReason(ST_GeomFromText('POLYGON (( 0 0, 0 5, 6 5, 6 0, 0 0 ), ( 2 2, 3 2, 3 4, 2 4, 2 2 ), ( 3 3, 3 1, 4 1, 4 3, 3 3))'));
Result:
"Self-intersection[3 2]"
  • Awesome, thanks! But I have the same question as above - how come in the figure 12, the first example (of features that are not compliant} is a polygon where boundaries only touch? I know in this case they are exterior and interior boundaries that touch, but still - why this is not possible? – Jan Pisl Nov 7 '18 at 8:38
  • 1
    That case breaks the rule The interior of every Polygon is a connected point set. The hole in the example cuts the polygon into two pieces. The geometry must be expressed as a multipolygon with two members. – user30184 Nov 7 '18 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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