[Proj] Conferting from WGS84 latlong to Transverse Mercator
Zoltan Szecsei
zoltans at geograph.co.za
Wed Sep 1 02:00:32 EST 2010
On 2010-09-01 08:43, Hanlie Pretorius wrote:
> Hi,
>
> My latlong coordinates are in South Africa: 28.375E and 27.375S
>
> I'm using pyproj to convert from latlong to a Transverse Meractor PCS
> centred on 29 deg East:
>
> ---
> import pyproj
>
> pr_tm = pyproj.Proj('+proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=0 +y_0=0
> +ellps=WGS84 +units=m +no_defs')
>
> x_latlong = 28.375
> y_latlong = -27.375
>
> x_tm, y_tm = pr_tm(x_latlong, y_latlong)
>
> print x_tm,y_tm
> -----
>
> output:
> -----
> -61827.9202408 -3029337.78594
> -----
>
> My question is this: why is the x-coordinate in the TM PCS negative?
> It is in the eastern hemisphere, so surely it should be positive? Or
> am I missing something?
>
>
Hi Hanlie,
Your point is west of the central meridian of Lo29.
Because you are using -ve South convention, West is also -ve, so in this
example, the signs of the result are correct.
HTH,
Zoltan--
===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
P.O. Box 7, Muizenberg 7950, South Africa.
65 Main Road, Muizenberg 7945
Western Cape, South Africa.
34° 6'16.35"S 18°28'5.62"E
Tel: +27-21-7884897 Mobile: +27-83-6004028
Fax: +27-86-6115323 www.geograph.co.za
===========================================
More information about the Proj
mailing list