[postgis-users] asSVG ignores negative coordinates

Darren Houston dhouston at beyondcompliance.ca
Thu Aug 11 09:32:38 PDT 2005


Hi Jon,

The Y-axis in SVG is inverted. Therefore, negative latitude coordinates become 
positive, and positive latitude coordinates become negative.

Your output looks fine.

Hope this helps,

Darren H.

On August 11, 2005 10:23 am, Jon Saints wrote:
> When using data from the southern hemisphere in
> WGS:4326 projection, It seems that the asSVG function
> incorrectly ignores negative values for coordinates.
> The asText function returns the negative coordinates
> as I would expect.
>
> Is this a bug or something in the SVG specification
> that I dont know about? I am using postgis version
> 1.0.2 on postgresql 8.0
>
> Here are my tests
> ---------------------------------
> asText() Query:
> select asTEXT(Extent(the_geom)) from province2000_proj
> where provname='BALI' group by provname;
>
> output:
>  POLYGON((114.431594848633
> -8.84896850585938,114.431594848633
> -8.06172275543213,115.712547302246
> -8.06172275543213,115.712547302246
> -8.84896850585938,114.431594848633 -8.84896850585938))
>
> asSVG query:
> select asSVG(Extent(the_geom)) from province2000_proj
> where provname='BALI' group by provname;
>
> output:
>  M 114.431594848632812 8.848968505859375
> 114.431594848632812 8.061722755432129
> 115.712547302246094 8.061722755432129
> 115.712547302246094 8.848968505859375
> 114.431594848632812 8.848968505859375
>
> Thanks
> Jon
> _______________________________________________
> 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