Opened 14 years ago
Closed 14 years ago
#463 closed defect (invalid)
ST_AsSVG doesn't handle EMPTY inputs well
| Reported by: | pramsey | Owned by: | colivier |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 1.5.2 |
| Component: | postgis | Version: | 1.5.X |
| Keywords: | Cc: | v.antoniou@… |
Description
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.
Change History (2)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
In fact it look like a already known bug corrected in 1.5.1 and 1.4.2:
http://trac.osgeo.org/postgis/changeset/5210 http://trac.osgeo.org/postgis/ticket/409
I close the ticket as invalid
Note:
See TracTickets
for help on using tickets.

Not able yet to reproduce it:
(checked also with trunk branch)
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)) ; length -------- 0