#666 closed defect (invalid)
st_isvalid fails to detect 3 points polygons
Reported by: | vmo | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 3.6.1 |
Component: | Default | Version: | 3.3.3 |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
select st_isvalid(st_geomfromtext('polygon((0 0, 1 0, 1 1, 0 0))'));
returns true, and should return false.
This ring self-intersects (at all points).
From Simple Feature Access - Part 1 (1.2.1), section 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, e.g.
∀ P ∈ Polygon, ∀ c1,c2∈P.Boundary(), c1≠c2,
∀ p, q ∈Point, p, q ∈ c1, p ≠ q , # the polygon in example does not satisfy this condition
[p ∈ c2] ⇒ [∃ δ > 0 ∋ [|p-q|<δ] ⇒ [q ∉ c2] ];
Change History (3)
comment:1 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Sorry, my mistake.
I intended to test polygon((0 0, 1 0, 0 0)), and this one indeed causes invalidity.
I see a triangle there, no self-intersection possible.