[postgis-devel] [PostGIS] #681: ST_AsGML crashes on POLYGON EMPTY

PostGIS trac at osgeo.org
Tue Dec 14 08:56:12 PST 2010


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

Comment(by robe):

 Well I'm looking at a day old build at the moment and its not crashing for
 ST_AsGML,and you note above states you fixed for gml and not kml. but I'm
 seeing dirty output.

 SELECT ST_AsGML(ST_GeomFromText('POLYGON EMPTY',4326)) As result;

 First call:
 <gml:Polygon srsName="EPSG:4326"></gml:Polygon>

 Second call:
 <gml:Polygon srsName="EPSG:4326"¯@

 Third call:
 <gml:Polygon srsName="EPSG:4326"`¹@

 So the outputs each time are giving me a different answer subsequent ones
 have junk.

 I'm also wondering why we are having so many problems with POLYGON EMPTY,
 the other empty variants I've been spot checking with the crashing
 functions don't crash.

 For example:

 SELECT ST_AsGML(ST_GeomFromText('MULTIPOLYGON EMPTY',4326)) As result;

 Consisently returns:
 <gml:MultiPolygon srsName="EPSG:4326"></gml:MultiPolygon>

 SELECT ST_AsKML(ST_GeomFromText('MULTIPOLYGON EMPTY',4326)) As result;
 consistently returns:
 <MultiGeometry></MultiGeometry>

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