[postgis-devel] [PostGIS] #463: ST_AsSVG doesn't handle EMPTY inputs well
PostGIS
trac at osgeo.org
Thu Mar 11 06:46:08 PST 2010
#463: ST_AsSVG doesn't handle EMPTY inputs well
---------------------+------------------------------------------------------
Reporter: pramsey | Owner: colivier
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 1.5.2
Component: postgis | Version: 1.5.X
Keywords: |
---------------------+------------------------------------------------------
As seen on the user list:
{{{
select assvg(difference(
LineFromText('LINESTRING(535568 198842,535549 198802,535505 198820,535524
198862,535568 198842)'),
difference(LineFromText('LINESTRING(535568 198842,535549 198802,535505
198820,535524 198862,535568 198842)'), LineFromText('LINESTRING(535900
198600,535900 199100)'))
),0,5)
Returns: empty row
But
select length(assvg(difference(
LineFromText('LINESTRING(535568 198842,535549 198802,535505 198820,535524
198862,535568 198842)'),
difference(LineFromText('LINESTRING(535568 198842,535549 198802,535505
198820,535524 198862,535568 198842)'), LineFromText('LINESTRING(535900
198600,535900 199100)'))
),0,5))
Returns: 5
}}}
Use lwgeom_is_empty() and return a null-terminated response pre-emptively.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/463>
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