Hi all,

I'm working on a simple select statement that converts a 900913 SRID bounding box to 4326 and uses the result in a where clause. Everything works fine on my local machine, but on the remote linux machine the conversion throws out some unexpected values. Anyone any ideas? Both 3857 and 900913 were missing from spatial_ref_sys on the remote machine, so i've put the 900913 definition in there myself, copied from my local machine. Funny thing is the first coordinate of the returned bounding box is correct but the rest is garbage.

any ideas?

thanks,
Andy

*******

Test query:
SELECT ASTEXT(ST_Transform(ST_SetSRID(ST_MakeBox2D( ST_Point(-633510.090428,7506727.67383),
ST_Point(-305748.113141,7834489.65112)),900913),4326));

Results:
WINDOWS (works perfectly)
POSTGIS: POSTGIS="1.4.0" GEOS="3.1.1-CAPI-1.6.0" PROJ="Rel. 4.6.1, 21 August 2008" USE_STATS

POLYGON((
-5.69091771787263 55.7394808196103,
-5.69091771787263 57.3620891294052,
-2.74658213778386 57.3620891294052,
-2.74658213778386 55.7394808196103,
-5.69091771787263 55.7394808196103))

LINUX (returns odd values with negative exponents)
POSTGIS: POSTGIS="1.3.6" GEOS="3.1.1-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 September 2009" USE_STATS

POLYGON((
-5.69091771787263 55.7394808196103,
-8.9225391644498e-07 8.99354923458109e-06,
-4.3062451273528e-07 8.99354923458109e-06,
-4.3062451273528e-07 8.73914761944114e-06,
-8.9225391644498e-07 8.73914761944114e-06))
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to