Plate Carre with latitude shift

Ed McNierney ed at TOPOZONE.COM
Wed Jan 16 08:27:14 PST 2008


Espen -

Frank's point is important; there is a fundamental difference between unprojected, geographic, lat/lon coordinates being used as X/Y rectangular coordinates and the "formal" use of a Plate Carrée projected coordinate system.

In essence, I now think you are thinking about this problem as "I want to treat latitude and longitude as Cartesian X/Y coordinates, except that I want to subtract 60 from every latitude (Y) coordinate".  While that's a reasonable way to think about it, it leads you to fall between two different concepts.  A geographic coordinate system is just that; it's geographic.  Latitude 0 is the Equator, and you can't simply decide that the Equator now runs through Norway.  A projected coordinate system will do what you need, but you then need to shift gears from thinking in terms of source geographic coordinates and instead think in terms of projected equirectangular coordinates.

Since projected coordinate systems are planar coordinate systems (generally) one cannot use angular units like degrees, and they are commonly measured in meters, as in this example.  Your EXTENT, therefore, is requesting a tiny map area of about 2 millimeters square, and you won't see anything because you've zoomed in much too far.

Your comments about cosines and having east-west coordinates "pushed together" is confusing.  A Plate Carrée projection produces an output where y=lat (not x), x=lon.  The lat_ts parameter is the latitude of true scale, and causes that latitude to be drawn at true scale, reducing distortion at that latitude.  It does not cause that latitude to become the origin or center of the projection.

I think you actually do NOT want a Plate Carrée projection, as that would be centered on the Equator, with the Equator being the latitude of true scale.

At this point I think it would be helpful to step back and explain what it is you're trying to accomplish, and what geography you are trying to cover with your map.  Then we might be able to better recommend a good projection to use for your purposes, and it might be easier to implement such a projection if it is a more "standard" sort of solution to your problem.

     - Ed

Ed McNierney
Chief Mapmaker
Demand Media / TopoZone.com
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
Phone: +1 (978) 251-4242
Fax: +1 (978) 251-1396

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Warmerdam
Sent: Wednesday, January 16, 2008 11:07 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Plate Carre with latitude shift

Espen Isaksen wrote:
> Ok, I set my mapfile like this:
> 
> EXTENT 10.6661 59.9155 10.6824 59.9214
> PROJECTION
>     "+proj=eqc +lat_ts=60 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84"
> END
> 
> and this is what I have had before:
> 
> EXTENT 10.6661 59.9155 10.6824 59.9214
> PROJECTION
>     "init=EPSG:4326"
> END
> 
>>From my understanding the former mapfile should give the same map as
> the latter, but the east-west coordinates should be pushed together as
> this formula would indicate: x=lon*cos(lat) where lat is 60 and the
> formula then gives x=lon*0.5?
> 
> All I get is a blank map, so I suppose there is something I have misunderstood?

Espen,

EPSG:4326 is a geographic coordinate system, and the coordinates are in
decimal degrees.  +proj=eqc is a projected coordinate system and the
coordinates are meters.  The location (-180,90) would be roughly
(-20000000,100000).

Essentially eqc (ie. equidistant cylindrical or Plate Carree) is just
a rescaling of EPSG:4326 from degrees to meters.

I'm afraid I just don't get what you hope to accomplish with +lat_ts=60.
Are you hoping to get one projected meter being one meter on the ground
at 60N as opposed to it being one meter at the equator as is the default?
I'm not aware of proj=eqc supporting any such option.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the MapServer-users mailing list