[postgis-devel] [PostGIS] #1586: st_dumpaspolygons makes not valid polygons

PostGIS trac at osgeo.org
Sat Feb 18 12:26:16 PST 2012


#1586: st_dumpaspolygons makes not valid polygons
----------------------+-----------------------------------------------------
 Reporter:  jomarlla  |       Owner:  pramsey      
     Type:  defect    |      Status:  new          
 Priority:  high      |   Milestone:  PostGIS 2.0.0
Component:  postgis   |     Version:  trunk        
 Keywords:            |  
----------------------+-----------------------------------------------------
 Dear PostGIS team,

 ST_Dumpaspolygons is building not valid polygons.

 select count(*) from  (select st_dumpaspolygons (rast) as vect from co1)
 as tabla where not st_isvalid ((vect).geom);

 NOTICE:  Ring Self-intersection at or near point 503582.96553112275
 4420706.2469141362
 NOTICE:  Ring Self-intersection at or near point 505882.96553112275
 4417206.2469141362
 ...282 more errors.


 Some cases::
 POLYGON((462682.965531123 4376006.24691414,462682.965531123
 4375706.24691414,462982.965531123 4375706.24691414,462982.965531123
 4375606.24691414,463182.965531123 4375606.24691414,463182.965531123
 4375706.24691414,463082.965531123 4375706.24691414,463082.965531123
 4375806.24691414,463182.965531123 4375806.24691414,463182.965531123
 4375706.24691414,463282.965531123 4375706.24691414,463282.965531123
 4375806.24691414,463382.965531123 4375806.24691414,463482.965531123
 4375806.24691414,463482.965531123 4375906.24691414,463282.965531123
 4375906.24691414,463282.965531123 4376006.24691414,462682.965531123
 4376006.24691414))


 POLYGON((500282.965531123 4380006.24691414,500282.965531123
 4379606.24691414,500382.965531123 4379606.24691414,500382.965531123
 4379406.24691414,500582.965531123 4379406.24691414,500582.965531123
 4379306.24691414,500682.965531123 4379306.24691414,500682.965531123
 4379206.24691414,500782.965531123 4379206.24691414,500782.965531123
 4379506.24691414,500582.965531123 4379506.24691414,500582.965531123
 4379606.24691414,500482.965531123 4379606.24691414,500482.965531123
 4379706.24691414,500382.965531123 4379706.24691414,500382.965531123
 4379806.24691414,500482.965531123 4379806.24691414,500482.965531123
 4379706.24691414,500582.965531123 4379706.24691414,500582.965531123
 4379906.24691414,500382.965531123 4379906.24691414,500382.965531123
 4380006.24691414,500282.965531123 4380006.24691414))


 POLYGON((516082.965531123 4364206.24691414,516082.965531123
 4363806.24691414,516382.965531123 4363806.24691414,516382.965531123
 4363906.24691414,516282.965531123 4363906.24691414,516282.965531123
 4364006.24691414,516182.965531123 4364006.24691414,516182.965531123
 4364106.24691414,516282.965531123 4364106.24691414,516282.965531123
 4364006.24691414,516382.965531123 4364006.24691414,516382.965531123
 4363906.24691414,516582.965531123 4363906.24691414,516582.965531123
 4364006.24691414,516682.965531123 4364006.24691414,516782.965531123
 4364006.24691414,516782.965531123 4364206.24691414,516582.965531123
 4364206.24691414,516582.965531123 4364106.24691414,516482.965531123
 4364106.24691414,516482.965531123 4364206.24691414,516082.965531123
 4364206.24691414))

 2 notes:

 ST_Makevalid fixes all of them and I think in a right way.

 Any of the fixed polygons become a multipolygon after fixing.
 Regards,

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/1586>
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-devel mailing list