[postgis-devel] [PostGIS] #1321: ST_AsGML fails to swap X/Y when outputting Envelope

PostGIS trac at osgeo.org
Wed Nov 23 10:34:18 PST 2011


#1321: ST_AsGML fails to swap X/Y when outputting Envelope
----------------------+-----------------------------------------------------
  Reporter:  strk     |       Owner:  pramsey      
      Type:  defect   |      Status:  closed       
  Priority:  medium   |   Milestone:  PostGIS 2.0.0
 Component:  postgis  |     Version:  trunk        
Resolution:  invalid  |    Keywords:               
----------------------+-----------------------------------------------------

Comment(by strk):

 Colivier: the difference between flags as seen by SQL/postgis and those as
 seen by liblwgeom:

 {{{

         if (option & 2)  lwopts &= ~LW_GML_IS_DIMS;
         if (option & 4)  lwopts |= LW_GML_SHORTLINE;
         if (option & 16) lwopts |= LW_GML_IS_DEGREE;
         if (option & 32) lwopts |= LW_GML_EXTENT;

 /** For GML3 only, include srsDimension attribute in output */
 #define LW_GML_IS_DIMS     (1<<0)
 /** For GML3 only, declare that datas are lat/lon. Swaps axis order */
 #define LW_GML_IS_DEGREE   (1<<1)
 /** For GML3, use <LineString> rather than <Curve> for lines */
 #define LW_GML_SHORTLINE   (1<<2)
 /** For GML2 and GML3, output only extent of geometry */
 #define LW_GML_EXTENT      (1<<4)

 }}}

 You can see, for example, that DEGREE is 2 at the liblwgeom and 16 at the
 sql level.
 SHORTLINE and EXTENT seem to be consistent. DIMS seems to be using the
 flag that in
 liblwgeom means DEGREE, isn't it ?

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1321#comment:5>
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