[postgis-users] 900913 bbox conversion problem

Andy Harrison andyh at alh.me.uk
Wed Nov 25 12:04:27 PST 2009


Brian Modra wrote:
> can you try the transform on the two points individually and post the
> results here please

It does work but only if only one ST_Transform() function is executed in 
the thread, the second fails.

SELECT 
ASTEXT(ST_Transform(ST_SetSRID(ST_Point(-305748.113141,7834489.65112),900913),4326)) 
as highright;
POINT(-2.74658203125265 57.3620898615614) correct!

SELECT 
ASTEXT(ST_Transform(ST_SetSRID(ST_Point(-633510.090428,7506727.67383),900913),4326)) 
as lowleft;
POINT(-5.69091796875412 55.7394816986905) correct!

Interesting, the points are correct only if one transformation is made 
under the same database connection. From what I can see, if you run both 
of the above transforms in the same session then the second transform 
returns the wrong value. Even as independent SQL SELECT statements, 
seems it will not convert two points. I should mention out that I am 
restricted to a PHP PDO connection on the server and using phpPgAdmin to 
do the test. Could probably get shell access if needed.

andy



More information about the postgis-users mailing list