[Proj] Different lat/lon projections

Mikael Rittri Mikael.Rittri at carmenta.com
Thu May 5 03:09:28 PDT 2011


Hello Jonathan,

you wrote:

> What is the correct CRS projection string for dealing with
> the following two lat/long projections (say, WGS84 datum):
> 
> 1) (xmin, xmax, ymin, ymax)= -180,180, -90, 90

Answer:

    +proj=longlat 

(or alternatively, +proj=latlong; I think these are equivalent).

> 2) 0, 360, -90, 90 

Answer:

    +proj=longlat +lon_wrap=180

The +lon_wrap parameter is documented on http://trac.osgeo.org/proj/wiki/GenParms
But it seems that the simple proj command recognizes but ignores +lon_wrap;
the verbose option does not say that +lon_wrap is unused, but it has
no effect (perhaps I am using it wrong):

C:\Program Files\FWTools2.4.7>proj +proj=utm +zone=11 +datum=WGS84 +lon_wrap=180 -I -v
#Universal Transverse Mercator (UTM)
# Cyl, Sph
# zone= south
# +proj=utm +zone=11 +datum=WGS84 +lon_wrap=180 +ellps=WGS84 +towgs84=0,0,0
500000 111111
117dW 1d0'18.918"N

Fortunately, the cs2cs command supports lon_wrap:

C:\Program Files\FWTools2.4.7>cs2cs +proj=utm +zone=11 +datum=WGS84 +to +proj=longlat +datum=WGS84 +lon_wrap=180 -v
# ---- From Coordinate System ----
#Universal Transverse Mercator (UTM)
# Cyl, Sph
# zone= south
# +proj=utm +zone=11 +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
# ---- To Coordinate System ----
#Lat/long (Geodetic alias)
#
# +proj=longlat +datum=WGS84 +lon_wrap=180 +ellps=WGS84 +towgs84=0,0,0
500000 111111
243dE 1d0'18.918"N 0.000

since we get 243dE as output. 

By the way, if you would like to achieve a similar effect 
as +lon_wrap for a cylindrical map projection, you can set
the central meridian +lon_0 to be at any longitude, but 
if you also want (most) coordinates to stay the same as 
they were with +lon_0=0, you must also modify the +x_0 
value (the false easting) to compensate. An example 
of this trick can be found here: 

http://lists.osgeo.org/pipermail/metacrs/2010-November/000517.html  

Best regards,
Mikael Rittri
Carmenta 
Sweden
http://www.carmenta.com

________________________________

From: proj-bounces at lists.maptools.org [mailto:proj-bounces at lists.maptools.org] On Behalf Of Jonathan Greenberg
Sent: den 28 april 2011 22:34
To: proj at lists.maptools.org
Subject: [Proj] Different lat/lon projections

Folks: 
What is the correct CRS projection string for dealing with the following two lat/long projections (say, WGS84 datum):

1) (xmin, xmax, ymin, ymax)= -180,180, -90, 90
2) 0, 360, -90, 90

Thanks!

--j

-- 
Jonathan A. Greenberg, PhD
Assistant Project Scientist
Center for Spatial Technologies and Remote Sensing (CSTARS)
Department of Land, Air and Water Resources
University of California, Davis
One Shields Avenue
Davis, CA 95616
Phone: 415-763-5476
AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307





More information about the Proj mailing list