[postgis-users] Transformation problem using transform()

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Tue May 2 04:53:09 PDT 2006


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of Marc Angelo
> Sent: 02 May 2006 11:04
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Transformation problem using transform()
> 
> Hi
> 
> Thanks very much Michael that worked but maybe someone can help me with
> this. If I run those waypoints through a transform I get the following
> geometry:-
> 
> SELECT Transform(position,27200) FROM waypoints =
> 0101000020406A0000B856779E53AB41417FC37EE399E55441
> 
> 
> Ran the geometry through the AsEWKT function as follows:-
> 
> SELECT AsEWKT('0101000020406A0000B856779E53AB41417FC37EE399E55441');
> 
> 
> ...and I get the following answer.
> "SRID=27200;POINT(2315943.23801693 5477991.55461204)"
> 
> I have now changed my import code to change the Lat Long of the co-
> ordinates
> around which does give me the correct Lat Long using the AsEWKT function
> using srid 4269 and 4326 but I get the above result using other srid's
> such
> as 27200......
> 
> any help would be greatly appreciated
> 
> Cheers
> Marc


Hi Marc,

Can you provide a complete test case, i.e. paste the complete output, along
with the result of SELECT postgis_full_version(), from your terminal into an
email so we can follow what you are trying to do? The following works for
me:


postgis=# select postgis_full_version();
                                         postgis_full_version
----------------------------------------------------------------------------
--------------------------
 POSTGIS="1.0.3" GEOS="2.1.3" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS
DBPROC="0.3.0" RELPROC="0.3.0"
(1 row)

postgis=# select transform(geomfromtext('POINT(170.50196 -45.879185)',
4326), 27200);
                     transform
----------------------------------------------------
 0101000020406A0000B856779E53AB41417FC37EE399E55441
(1 row)

postgis=# select asewkt(transform(geomfromtext('POINT(170.50196
-45.879185)', 4326), 2014));
                        asewkt
------------------------------------------------------
 SRID=2014;POINT(-1160493.81142435 -12600886.5012357)
(1 row)

postgis=# select asewkt(transform(geomfromtext('POINT(170.50196
-45.879185)', 4326), 27200));
                       asewkt
-----------------------------------------------------
 SRID=27200;POINT(2315943.23801693 5477991.55461204)
(1 row)

postgis=# select asewkt(transform(geomfromtext('POINT(170.50196
-45.879185)', 4326), 2029));
                        asewkt
------------------------------------------------------
 SRID=2029;POINT(-2815521.73265803 -12147021.3686016)
(1 row)

postgis=# select asewkt(transform(geomfromtext('POINT(170.50196
-45.879185)', 4326), 2848));
                       asewkt
-----------------------------------------------------
 SRID=2848;POINT(-15207263.2550435 29379.7135849681)
(1 row)

postgis=# select asewkt(transform(geomfromtext('POINT(170.50196
-45.879185)', 4326), 26705));
                        asewkt
-------------------------------------------------------
 SRID=26705;POINT(-2313710.26939412 -5769806.70943206)
(1 row)

postgis=# select asewkt(transform(geomfromtext('POINT(170.50196
-45.879185)', 4326), 27231));
                       asewkt
-----------------------------------------------------
 SRID=27231;POINT(317023.126096973 697834.081296451)
(1 row)


Kind regards,

Mark.

------------------------
WebBased Ltd
17 Research Way
Plymouth
PL6 8BT

T: +44 (0)1752 797131
F: +44 (0)1752 791023

http://www.webbased.co.uk   
http://www.infomapper.com
http://www.swtc.co.uk  

This email and any attachments are confidential to the intended recipient
and may also be privileged. If you are not the intended recipient please
delete it from your system and notify the sender. You should not copy it or
use it for any purpose nor disclose or distribute its contents to any other
person.





More information about the postgis-users mailing list