[postgis-tickets] [PostGIS] #5226: ST_DumpPoints ignores Points

PostGIS trac at osgeo.org
Mon Aug 29 00:31:14 PDT 2022


#5226: ST_DumpPoints ignores Points
---------------------------+---------------------------
 Reporter:  DanielGKiel    |      Owner:  pramsey
     Type:  defect         |     Status:  new
 Priority:  medium         |  Milestone:  PostGIS 3.2.4
Component:  postgis        |    Version:  3.1.x
 Keywords:  ST_DumpPoints  |
---------------------------+---------------------------
 In case of a CURVEPOLYGON consisting of two COMPOUNDCURVEs, ST_DumpPoints
 does not return the coordinates of the 2nd COMPOUNDCURVE:

 {{{
 SELECT path, ST_AsText(geom)
 FROM (
                 SELECT (ST_DumpPoints(g.geom)).*
                 --SELECT (ST_Dump(g.geom)).*
                 FROM (SELECT 'CURVEPOLYGON ZM (COMPOUNDCURVE ZM
 ((32496392.476 6019012.409 9999.9999 0,32496393.966 6019012.749 9999.9999
 0),
                           (32496393.966 6019012.749 9999.9999
 0,32496395.495 6019006.162 9999.9999 0),(32496395.495 6019006.162
 9999.9999 0,32496420.606 6019012.018 9999.9999 0),
                           (32496420.606 6019012.018 9999.9999
 0,32496419.006 6019018.925 9999.9999 0),(32496419.006 6019018.925
 9999.9999 0,32496390.707 6019020.046 9999.9999 0),
                           (32496390.707 6019020.046 9999.9999
 0,32496392.476 6019012.409 9999.9999 0)),COMPOUNDCURVE ZM ((32496443.977
 6019022.162 9999.9999 0,32496440.168 6019039.006 9999.9999 0),
                           (32496440.168 6019039.006 9999.9999
 0,32496447.865 6019040.805 9999.9999 0),(32496447.865 6019040.805
 9999.9999 0,32496449.535 6019033.668 9999.9999 0),
                           (32496449.535 6019033.668 9999.9999
 0,32496454.493 6019034.827 9999.9999 0),(32496454.493 6019034.827
 9999.9999 0,32496443.977 6019022.162 9999.9999 0)))'::geometry AS geom
                          ) AS g
 ) j;
 }}}

 Workaround:
 Use ST_Dump first to Dump the Points into LINESTRINGs. ST_DumpPoints works
 correctly on these.

 {{{
 SELECT path, ST_AsText(geom)
 FROM (
                 SELECT (ST_DumpPoints(j.geom)).*
                 FROM (
                                 SELECT (ST_Dump(g.geom)).*
                                 FROM (SELECT 'CURVEPOLYGON ZM
 (COMPOUNDCURVE ZM ((32496392.476 6019012.409 9999.9999 0,32496393.966
 6019012.749 9999.9999 0),
                           (32496393.966 6019012.749 9999.9999
 0,32496395.495 6019006.162 9999.9999 0),(32496395.495 6019006.162
 9999.9999 0,32496420.606 6019012.018 9999.9999 0),
                           (32496420.606 6019012.018 9999.9999
 0,32496419.006 6019018.925 9999.9999 0),(32496419.006 6019018.925
 9999.9999 0,32496390.707 6019020.046 9999.9999 0),
                           (32496390.707 6019020.046 9999.9999
 0,32496392.476 6019012.409 9999.9999 0)),COMPOUNDCURVE ZM ((32496443.977
 6019022.162 9999.9999 0,32496440.168 6019039.006 9999.9999 0),
                           (32496440.168 6019039.006 9999.9999
 0,32496447.865 6019040.805 9999.9999 0),(32496447.865 6019040.805
 9999.9999 0,32496449.535 6019033.668 9999.9999 0),
                           (32496449.535 6019033.668 9999.9999
 0,32496454.493 6019034.827 9999.9999 0),(32496454.493 6019034.827
 9999.9999 0,32496443.977 6019022.162 9999.9999 0)))'::geometry AS geom
                          ) AS g
                 ) j
         ) l;
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5226>
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