[postgis-devel] [PostGIS] #1054: ZM mixup (ST_Summary giving screwy answers)

PostGIS trac at osgeo.org
Wed Jun 22 16:33:24 PDT 2011


#1054: ZM mixup (ST_Summary giving screwy answers)
----------------------+-----------------------------------------------------
 Reporter:  robe      |       Owner:  pramsey      
     Type:  defect    |      Status:  new          
 Priority:  critical  |   Milestone:  PostGIS 2.0.0
Component:  postgis   |     Version:  trunk        
 Keywords:            |  
----------------------+-----------------------------------------------------
 Paul,

 I was about to do #649 and while I was at it change to use new SQL/MM
 proper syntax when I noticed ST_Summary is giving what I consider the
 wrong answers.


 {{{

 SELECT ST_Summary(ST_GeomFromEWKT('LINESTRING Z(0 0 1, 1 1 1)'));

 yields:
 LineString[M] with 2 points

 }}}

 huh -- where is my M?
 Same issue with:


 {{{
 SELECT ST_Summary(ST_GeomFromEWKT('POLYGON Z((0 0 1, 1 1 2, 1 2 3, 1 1 1,
 0 0 1))'));

 same answer with:

 SELECT ST_Summary(ST_GeomFromEWKT('POLYGON((0 0 1, 1 1 2, 1 2 3, 1 1 1, 0
 0 1))'))

 I get:
 Polygon[ZM] with 1 rings
    ring 0 has 5 points

 }}}


 Note: this is different form what we have documented. I never did know
 what that B meant though.
 Also note that Mike Toews output has changed as well - refer to #649

 His now gives this:

 {{{
 SELECT st_summary('SRID=4326;MULTILINESTRING((0 0 0 0, 1 1 1 1),
 (2 2 2 2, 3 3 3 3))');


   MultiLineString[ZB] with 2 elements
   LineString[M] with 2 points
   LineString[M] with 2 points
 }}}

 strk -- can you let me know what to put for these bracket flags and
 confirm what they should be returning?

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1054>
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