[geos-devel] [GEOS] #666: st_isvalid fails to detect 3 points polygons

GEOS geos-trac at osgeo.org
Thu Sep 26 01:24:46 PDT 2013


#666: st_isvalid fails to detect 3 points polygons
------------------------+---------------------------------------------------
 Reporter:  vmo         |       Owner:  geos-devel@…              
     Type:  defect      |      Status:  new                       
 Priority:  major       |   Milestone:  3.4.3                     
Component:  Default     |     Version:  3.3.3                     
 Severity:  Unassigned  |    Keywords:                            
------------------------+---------------------------------------------------
 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] ];

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/666>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list