Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1323 closed defect (fixed)

lwgeom_extent_to_gml3 segfaults when passed an LWGEOM with no BBOX cache

Reported by: strk Owned by: strk
Priority: high Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description

When passing an LWGEOM with no bounding box to lwgeom_extent_to_gml3, it segfaults.

I haven't tried with lwgeom_extent_to_gml2. Beside, I'm also not sure why these functions take an LWGEOM rather than just a GBOX.

Change History (5)

comment:1 by strk, 13 years ago

See also #1322 for a case in which this showed up.

comment:2 by strk, 13 years ago

Owner: changed from pramsey to strk
Status: newassigned

comment:3 by strk, 13 years ago

What should this function return for an empty geometry ? For comparison, ST_AsGML('LINESTRING EMPTY') returns:

 <gml:LineString><gml:coordinates></gml:coordinates></gml:LineString>

.. which I'm not sure is correct either ..

comment:4 by strk, 13 years ago

Resolution: fixed
Status: assignedclosed

Fixed by r8333, which includes comprensive regress testing. The EMPTY case may be subject to change.

Note that the commit also fixes support for srsDimension option (don't remember how to specify that option at the SQL level but should be written in the manual page, the tests I added were at the liblwgeom level).

comment:5 by strk, 13 years ago

r8334 reworks the empty box GML to be empty tags <Box/> and <Envelope/>

Note: See TracTickets for help on using tickets.