[postgis-devel] [PostGIS] #1595: problem with geom from ST_Line_SubString

PostGIS trac at osgeo.org
Tue Feb 21 08:14:18 PST 2012


#1595: problem with geom from ST_Line_SubString
-------------------------------+--------------------------------------------
 Reporter:  worthlutz          |       Owner:  pramsey      
     Type:  defect             |      Status:  new          
 Priority:  critical           |   Milestone:  PostGIS 1.5.4
Component:  postgis            |     Version:  1.5.X        
 Keywords:  ST_Line_Substring  |  
-------------------------------+--------------------------------------------
 Mapserver will not display in a Line layer the_geom returned from
 ST_Line_Substring().  In looking into this, I noticed that the geometry
 from ST_Line_Substring is different from the original geometry.  This was
 1st noticed in the text representations of the geometry.  The text
 representations of the substring has "SRID=32019;" added before the points
 in the text after "MULTILINESTRING(".

 The geometry representation is also different.  See results from the
 SQL below. Note the substring is the entire string to be able to compare
 the two geometry results. I assume they should be the same.

 {{{
 SELECT
     the_geom as orig_geom,
     ST_Line_Substring( the_geom, 0.0, 1.0 ) AS substring_geom,
     ST_AsText( the_geom ) AS original_text,
     ST_AsText(
       ST_Line_Substring( the_geom, 0.0, 1.0 )
    ) AS substring_text,
     ST_AsEWKT( the_geom ) AS original_EWKT,
     ST_AsEWKT(
       ST_Line_Substring( the_geom, 0.0, 1.0 )
     ) AS substring__EWKT
 FROM (
   SELECT
     ST_SetSRID(
       ST_GeomFromText(
         'MULTILINESTRING((2108912.024 773324.5672,2109137.75 773640.25))'
       ),
       32019
     ) AS the_geom
 ) AS foo
 }}}


 I do not know if these items are why Mapserver will not display the
 geometry but they looked strange.  Openjump will display the geometry
 which may point to a problem with Mapserver. Point me there is that is the
 case. Mapserver will display the endpoints of the substring geometry with
 ST_EndPoint(the_geom) in a Point layer.

 I am working on a simple Mapserver example to attach.

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