Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#666 closed defect (invalid)

st_isvalid fails to detect 3 points polygons

Reported by: vmo Owned by: geos-devel@…
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 strk, 11 years ago

Resolution: invalid
Status: newclosed

I see a triangle there, no self-intersection possible.

comment:2 by vmo, 11 years ago

Sorry, my mistake.

I intended to test polygon((0 0, 1 0, 0 0)), and this one indeed causes invalidity.

comment:3 by strk, 8 years ago

Milestone: 3.4.33.6.1

Ticket retargeted after milestone deleted

Note: See TracTickets for help on using tickets.