[postgis-users] Postgis functions returning hidden weird characters! (?)

Paul Ramsey pramsey at opengeo.org
Thu Mar 11 06:46:25 PST 2010


It looks to me like ST_AsSVG doesn't very carefully handle empty
geometry inputs, so you're getting a non-terminated "string" back.

http://trac.osgeo.org/postgis/ticket/463

On Thu, Mar 11, 2010 at 6:36 AM, Vyron Antoniou <v.antoniou at ucl.ac.uk> wrote:
> Hi,
>
> Check this out:
>
> 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
>
> Any ideas?
>
> Cheers,
> Byron
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list