[postgis-devel] [PostGIS] #681: ST_AsGML and ST_AsKML crashes on POLYGON EMPTY or acts really bizarre

PostGIS trac at osgeo.org
Wed Dec 15 07:18:04 PST 2010


#681: ST_AsGML and ST_AsKML crashes on POLYGON EMPTY or acts really bizarre
----------------------+-----------------------------------------------------
  Reporter:  robe     |       Owner:  colivier     
      Type:  defect   |      Status:  reopened     
  Priority:  medium   |   Milestone:  PostGIS 2.0.0
 Component:  postgis  |     Version:  trunk        
Resolution:           |    Keywords:               
----------------------+-----------------------------------------------------

Comment(by robe):

 to add to this - ST_AsKML geography variant appears to crash for ALL
 variants of EMPTY. Including our beloved GEOMETRYCOLLECTION EMPTY.

 SELECT ST_AsKML(geography(ST_GeomFromText('GEOMETRYCOLLECTION
 EMPTY',4326)));

 and the geometry empty variants is returning NULL:

 {{{
 SELECT ST_AsKML(foo1.the_geom) is null
 FROM ((SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom
         UNION ALL SELECT ST_GeomFromText('MULTIPOINT EMPTY',4326) As
 the_geom
         UNION ALL SELECT ST_GeomFromText('MULTIPOLYGON EMPTY',4326) As
 the_geom
         UNION ALL SELECT ST_GeomFromText('LINESTRING EMPTY',4326) As
 the_geom
         UNION ALL SELECT ST_GeomFromText('MULTILINESTRING EMPTY',4326) As
 the_geom ) ) As foo1 ;
 }}}

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