Discussion:
proj4 specifications for a rotated latlon grid on a sphere?
(too old to reply)
Martin Ivanov
2012-08-13 15:19:17 UTC
Permalink
Dear PROJ4 users,

I have a rotated latitude-longitude grid with coordinates of the north
pole POLE_LAT=39.25 and POLE_LON=-162.
The data are on a sphere with radius 6371 km. Is it possible to define
proj4 specifications for this grid, so that I can make
coordinate transformations? Most interesting for me would be how to
specify the towgs84 parameter.

Any suggestions will be appreciated.

Best regards,
--
Dr. Martin Ivanov
Eberhard-Karls-Universit?t T?bingen
Mathematisch-Naturwissenschaftliche Fakult?t
Fachbereich Geowissenschaften
Water & Earth System Science (WESS)
H?lderlinstra?e 12, 72074 T?bingen, Deutschland
Tel. +4970712974213
Mikael Rittri
2012-08-13 20:40:10 UTC
Permalink
Hello Martin.
In some GIS software, it would indeed be possible to rotate
a graticule via +towgs84 parameters with huge rotations.
But I think Proj.4 (like most GIS software) uses a simplified,
linearized implementation of the rotations, assuming they
are small (up to 5 or perhaps 10 arc seconds).

But you can rotate a graticule on a sphere by using Proj.4
twice. Let's try it for the point lat = 80, lon = 0 on the rotated
proj +proj=stere +lon_0=0 +lat_0=90 +a=6371000 +b=6371000
0 80

0.00 -1114780.55

Next, inverse project back to long/lat using a _different_
proj +proj=stere -I +lon_0=-162 +lat_0=39.25 +a=6371000 +b=6371000
0.00 -1114780.55

162dW 29d15'N

That's the corresponding long/lat on the plain graticule.
(I haven't tested if this works on or near the south poles
of the graticules.)

I have assumed that the prime meridian (zero longitude) of
the rotated graticule goes south from the rotated north pole.
If it doesn't, you can model its direction by changing the
value of lon_0 to something non-zero in the first definition.

It may be possible to chain the forward and inverse
projection together into a single command line by using
a pipe, but I don't remember the syntax for that.

Best regards

Mikael Rittri
Carmenta
Sweden
http://www.carmenta.com
Dear PROJ4 users,
I have a rotated latitude-longitude grid with coordinates of the north
pole POLE_LAT=39.25 and POLE_LON=-162.
The data are on a sphere with radius 6371 km. Is it possible to define
proj4 specifications for this grid, so that I can make
coordinate transformations? Most interesting for me would be how to
specify the towgs84 parameter.
Any suggestions will be appreciated.
Best regards,
--
Dr. Martin Ivanov
Eberhard-Karls-Universit?t T?bingen
Mathematisch-Naturwissenschaftliche Fakult?t
Fachbereich Geowissenschaften
Water & Earth System Science (WESS)
H?lderlinstra?e 12, 72074 T?bingen, Deutschland
Tel. +4970712974213
_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj
Davide Cesari
2012-08-14 09:49:15 UTC
Permalink
Hello Martin, in principle this should be a job for proj's ob_tran
transformation

ob_tran : General Oblique Transformation
Misc Sph
o_proj= plus parameters for projection
o_lat_p= o_lon_p= (new pole) or
o_alpha= o_lon_c= o_lat_c= or
o_lon_1= o_lat_1= o_lon_2= o_lat_2=

but I am afraid that the way the parameters are to be fed to proj is
different from the convention used in meteorological gridded data that I
suppose you are using, there was some past discussion here:

http://lists.maptools.org/pipermail/proj/2010-June/005234.html
http://lists.maptools.org/pipermail/proj/2011-October/005913.html

please report on any success. Anyway the idea proposed by Mikael may be
a good workaround which is worth tesating,
Best regards, Davide
--
============================= Davide Cesari ============================
Servizio IdroMeteoClima - ARPA Emilia Romagna
NWP modelling - Modellistica numerica previsionale
Home page: http://www.webalice.it/o.drofa/davide/
Address: ARPA-SIM, Viale Silvani 6, 40122 Bologna, Italy
========================================================================
Post by Mikael Rittri
Hello Martin.
In some GIS software, it would indeed be possible to rotate
a graticule via +towgs84 parameters with huge rotations.
But I think Proj.4 (like most GIS software) uses a simplified,
linearized implementation of the rotations, assuming they
are small (up to 5 or perhaps 10 arc seconds).
But you can rotate a graticule on a sphere by using Proj.4
twice. Let's try it for the point lat =0, lon = 0 on the rotated
...
Post by Mikael Rittri
Best regards
Mikael Rittri
Carmenta
Sweden
http://www.carmenta.com
Post by Martin Ivanov
Dear PROJ4 users,
I have a rotated latitude-longitude grid with coordinates of the north
pole POLE_LAT9.25 and POLE_LON=-162.
The data are on a sphere with radius 6371 km. Is it possible to define
proj4 specifications for this grid, so that I can make
coordinate transformations? Most interesting for me would be how to
specify the towgs84 parameter.
Any suggestions will be appreciated.
Best regards,
--
Dr. Martin Ivanov
Eberhard-Karls-Universit?t T?bingen
Mathematisch-Naturwissenschaftliche Fakult?t
Fachbereich Geowissenschaften
Water & Earth System Science (WESS)
H?lderlinstra?e 12, 72074 T?bingen, Deutschland
Tel. +4970712974213
_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj
Hermann Peifer
2012-08-13 23:50:06 UTC
Permalink
Post by Martin Ivanov
Dear PROJ4 users,
I have a rotated latitude-longitude grid with coordinates of the north
pole POLE_LAT=39.25 and POLE_LON=-162.
The data are on a sphere with radius 6371 km. Is it possible to define
proj4 specifications for this grid...
You could try:
+proj=ob_tran +o_proj=latlon +o_lon_p=-162 +o_lat_p=39.25 +lon_0=180

Hermann
Mikael Rittri
2012-08-14 08:51:40 UTC
Permalink
That's interesting, Hermann, I didn't know about ob_tran.

After some googling, I found an older post, also by you, where
you also used the flag

-m 57.2957795130823

which seems to be needed to get degrees instead of radians.

See

http://lists.maptools.org/pipermail/proj/2011-October/005906.html

and

http://lists.maptools.org/pipermail/proj/2011-October/005913.html

and also

http://lists.maptools.org/pipermail/proj/2010-June/005234.html


On the related topic, here is a reference saying that meteorological
long/lat data on a sphere needs no datum shift to WGS84:

http://www.ie.unc.edu/cempd/projects/mims/spatial/grids_ellipsoids_map_proj.html


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 Hermann Peifer
Sent: Tuesday, August 14, 2012 1:50 AM
To: PROJ.4 and general Projections Discussions
Subject: Re: [Proj] proj4 specifications for a rotated latlon grid on a sphere?
Post by Martin Ivanov
Dear PROJ4 users,
I have a rotated latitude-longitude grid with coordinates of the north
pole POLE_LAT=39.25 and POLE_LON=-162.
The data are on a sphere with radius 6371 km. Is it possible to define
proj4 specifications for this grid...
You could try:
+proj=ob_tran +o_proj=latlon +o_lon_p=-162 +o_lat_p=39.25 +lon_0=180

Hermann
Hermann Peifer
2012-08-14 18:38:24 UTC
Permalink
Indeed, I forgot to mention this switch. Sorry.

From my .bash_history, I see that I have also been using:
+to_meter=.0174532925199 (which has the same effect, if I remember
correctly).

Hermann
Post by Mikael Rittri
That's interesting, Hermann, I didn't know about ob_tran.
After some googling, I found an older post, also by you, where
you also used the flag
-m 57.2957795130823
which seems to be needed to get degrees instead of radians.
See
http://lists.maptools.org/pipermail/proj/2011-October/005906.html
and
http://lists.maptools.org/pipermail/proj/2011-October/005913.html
and also
http://lists.maptools.org/pipermail/proj/2010-June/005234.html
On the related topic, here is a reference saying that meteorological
http://www.ie.unc.edu/cempd/projects/mims/spatial/grids_ellipsoids_map_proj.html
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 Hermann Peifer
Sent: Tuesday, August 14, 2012 1:50 AM
To: PROJ.4 and general Projections Discussions
Subject: Re: [Proj] proj4 specifications for a rotated latlon grid on a sphere?
Post by Martin Ivanov
Dear PROJ4 users,
I have a rotated latitude-longitude grid with coordinates of the north
pole POLE_LAT=39.25 and POLE_LON=-162.
The data are on a sphere with radius 6371 km. Is it possible to define
proj4 specifications for this grid...
+proj=ob_tran +o_proj=latlon +o_lon_p=-162 +o_lat_p=39.25 +lon_0=180
Hermann
_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj
_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj
Martin Ivanov
2012-08-15 10:57:17 UTC
Permalink
Thank you all very much for your replies. I tried the suggestion of
Herman Peifer and it worked perfectly.
The only thing is, as Herman has already noted, that to get get the
coordinates in the rotated grid one has to use
invproj, and to get the coordinates back to longlat one has to use proj.

Best regards
--
Dr. Martin Ivanov
Eberhard-Karls-Universit?t T?bingen
Mathematisch-Naturwissenschaftliche Fakult?t
Fachbereich Geowissenschaften
Water & Earth System Science (WESS)
H?lderlinstra?e 12, 72074 T?bingen, Deutschland
Tel. +4970712974213
Loading...