[Proj] wgs84 northings and eastings
Mikael Rittri
Mikael.Rittri at carmenta.com
Thu May 26 08:27:37 EST 2011
Hello Roger.
> I would like to project WGS84 latitude and longitudes on
> to a transverse mercator surface, without any datum shift.
You write "transverse mercator", but it seems you mean
ordinary mercator (Web Mercator, to be specific).
The +to definition you suggest is not correct for WGS84 Web Mercator, though.
This is because the datum shift you use,
+towgs84=0,0,0,0,0,0,0
is not the same as unmodified lat/long, or "without any datum shift"
as you say. It means "no datum shift" only if the +from and +to definitions
use the same ellipsoid, and in your case the +from definition uses the
WGS84 ellipsoid, while the +to definition uses a sphere instead.
So, you have to use a trick: use
+nadgrids=@null
instead. See
http://trac.osgeo.org/proj/wiki/FAQ#ChangingEllipsoidWhycantIconvertfromWGS84toGoogleEarthVirtualGlobeMercator
Regards,
Mikael Rittri
Carmenta
Sweden
http://www.carmenta.com
-----Original Message-----
From: proj-bounces at lists.maptools.org [mailto:proj-bounces at lists.maptools.org] On Behalf Of Roger Oberholtzer
Sent: den 24 maj 2011 19:30
To: PROJ.4 and general Projections Discussions
Subject: Re: [Proj] wgs84 northings and eastings
So, perhaps I should re-phrase my original question:
I would like to project WGS84 latitude and longitudes on to a transverse mercator surface, without any datum shift. How should that be specified in proj? I use the C interface. Using ED50 as an example, I divide the proj string into a 'from':
from = pj_init_plus("+proj=latlong +datum=WGS84");
and a 'to':
to = pj_init_plus("+proj=utm "
"+ellps=intl "
"+k=0.999600 "
"+x_0=500000.0 "
"+y_0=0.0 "
"+zone=30 "
"+units=m "
"+towgs84=-125.098545,-76.000054,-156.198703,0.0,0.0,-1.129,8.30463103 "
"+no_defs");
I then use pj_transform(from, to, ...) to do the transform. (Switching the 'from' and 'to' allows a reverse transform).
Would this be correct for the transform?
from = pj_init_plus("+proj=latlong +datum=WGS84");
to = pj_init_plus("+proj=merc "
"+k=1.0 "
"+x_0=0 "
"+y_0=0 "
"+lon_0=0.0 "
"+lat_0=0.0 "
"+towgs84=0,0,0,0,0,0,0 "
"+a=6378137 "
"+b=6378137 "
"+no_defs");
It is the entire 'from', and the +towgs= in the 'to' that have me confused. This is based on http://spatialreference.org/ref/sr-org/45/
All comments welcome!
Yours sincerely,
Roger Oberholtzer
OPQ Systems / Ramböll RST
Office: Int +46 10-615 60 20
Mobile: Int +46 70-815 1696
roger.oberholtzer at ramboll.se
________________________________________
Ramböll Sverige AB
Krukmakargatan 21
P.O. Box 17009
SE-104 62 Stockholm, Sweden
www.rambollrst.se
_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj
More information about the Proj
mailing list