[postgis-tickets] [PostGIS] #2378: ST_CollectionExtract forms invalid polygons

PostGIS trac at osgeo.org
Mon Jul 8 06:24:04 PDT 2013


#2378: ST_CollectionExtract forms invalid polygons
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.1.1
Component:  postgis  |     Version:  2.0.x        
 Keywords:           |  
---------------------+------------------------------------------------------
 ST_CollectionExtract is similarly flawed as noted in #2377 for
 ST_CollectionHomogenize

 {{{
 SELECT
     ST_AsText(ST_CollectionExtract(ST_Split(g1.geom1, g1.geom2),3))
     As geom
 FROM (SELECT
   ST_GeomFromText('POLYGON((2 4.5,3 2.6,3 1.8,2 0,-1.5 2.2,
    0.056 3.222,-1.5 4.2,2 6.5,2 4.5))') As geom1,
 ST_GeomFromText('LINESTRING(-0.62 5.84,-0.8 0.59)') As geom2) AS g1;
 }}}

 return invalid multipolygon:


 {{{
 MULTIPOLYGON(((2 4.5,3 2.6,3 1.8,2 0,-0.760731980182196
 1.73531724468595,-0.727401641068799 2.70745213549337,0.056
 3.222,-0.693606166057922 3.69315348997728,-0.657240688157675
 4.75381326206781,2 6.5,2 4.5)),((-0.760731980182196 1.73531724468595,-1.5
 2.2,-0.727401641068799 2.70745213549337,-0.760731980182196
 1.73531724468595)),((-0.693606166057922 3.69315348997728,-1.5
 4.2,-0.657240688157675 4.75381326206781,-0.693606166057922
 3.69315348997728)))
 }}}

 which is invalid because edges are shared.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2378>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list