Plate Carre with latitude shift

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Plate Carre with latitude shift

Espen Isaksen
Hi!

I am wondering how I can do a latitude shift with a plain longlat
projection(4326). I have tried to change +lat_ts to 60 degrees instead
of 0, but that does not change much.

I am wondering if I have misunderstood this completely. For me it
seems like EPSG:4326 is a plain Plate Carre projection where I should
be able to latitude shift the origin to get a better result in the
nothern areas of Europe?

Espen
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Ed McNierney-4
Espen -

The EPSG coordinate system codes, like EPSG:4326, generally are used to fully specify a projection.  If you need to "customize" a projection described by an EPSG code, I would recommend using a full PROJ text description, and specify the use of the equirectangular (Plate Carrée) projection:

+proj=eqc +lat_ts=60 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84

     - Ed

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

-----Original Message-----
From: UMN MapServer Users List [mailto:[hidden email]] On Behalf Of Espen Isaksen
Sent: Wednesday, January 16, 2008 9:38 AM
To: [hidden email]
Subject: [UMN_MAPSERVER-USERS] Plate Carre with latitude shift

Hi!

I am wondering how I can do a latitude shift with a plain longlat
projection(4326). I have tried to change +lat_ts to 60 degrees instead
of 0, but that does not change much.

I am wondering if I have misunderstood this completely. For me it
seems like EPSG:4326 is a plain Plate Carre projection where I should
be able to latitude shift the origin to get a better result in the
nothern areas of Europe?

Espen
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Espen Isaksen
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

On 16/01/2008, Ed McNierney <[hidden email]> wrote:

> Espen -
>
> The EPSG coordinate system codes, like EPSG:4326, generally are used to fully specify a projection.  If you need to "customize" a projection described by an EPSG code, I would recommend using a full PROJ text description, and specify the use of the equirectangular (Plate Carrée) projection:
>
> +proj=eqc +lat_ts=60 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84
>
>      - Ed
>
> Ed McNierney
> Chief Mapmaker
> Demand Media / TopoZone.com
> 73 Princeton Street, Suite 305
> North Chelmsford, MA 01863
> [hidden email]
> Phone: +1 (978) 251-4242
> Fax: +1 (978) 251-1396
>
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Frank Warmerdam
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, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Ed McNierney-4
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
[hidden email]
Phone: +1 (978) 251-4242
Fax: +1 (978) 251-1396

-----Original Message-----
From: UMN MapServer Users List [mailto:[hidden email]] On Behalf Of Frank Warmerdam
Sent: Wednesday, January 16, 2008 11:07 AM
To: [hidden email]
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, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Ed McNierney-4
In reply to this post by Frank Warmerdam
Frank -

My comment to Espen, "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", seems in conflict with your comment "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."

It sounds like I am misunderstanding what lat_ts does.  If it doesn't do what I thought (cause 60N to be the latitude of true scale, where one meter in map units equals one meter on the ground), what does it do?

     - Ed

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

-----Original Message-----
From: UMN MapServer Users List [mailto:[hidden email]] On Behalf Of Frank Warmerdam
Sent: Wednesday, January 16, 2008 11:07 AM
To: [hidden email]
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, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Frank Warmerdam
Ed McNierney wrote:
> Frank -
>
> My comment to Espen, "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", seems in conflict with your comment "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."
>
> It sounds like I am misunderstanding what lat_ts does.  If it doesn't do what I thought (cause 60N to be the latitude of true scale, where one meter in map units equals one meter on the ground), what does it do?

Ed,

I stand corrected.  Lat_ts is indeed a supported parameter for eqc.  I had
just never used it and didn't realize it was supported for that projection.

I'll just shut up now. :-)

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Ed McNierney-4
Frank -

Well, I can't claim to know that it actually DOES anything.....

A long time ago I was writing graphics display hardware device drivers,
and a new version of the Microsoft C compiler had just been released
with support, for the first time, for the "volatile" keyword.  This
keyword modified a pointer declaration and told the compiler that the
value pointed to (a hardware status register, for example) might change
without the program's knowledge.  References to it, therefore, could not
be optimized away and the value actually read each time the pointer was
dereferenced.

I spent a day trying to get the keyword to work, and it just wasn't
working.  I finally read the README file and found one of the more
memorable technical euphemisms I've ever read:

        "The keyword 'volatile' is implemented syntactically but not
semantically."

That's the fanciest way I've ever seen to say, "It doesn't work, but we
won't tell you!"

        - Ed

-----Original Message-----
From: UMN MapServer Users List [mailto:[hidden email]] On
Behalf Of Frank Warmerdam
Sent: Wednesday, January 16, 2008 12:01 PM
To: [hidden email]
Subject: Re: [UMN_MAPSERVER-USERS] Plate Carre with latitude shift

Ed McNierney wrote:
> Frank -
>
> My comment to Espen, "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", seems in conflict with your comment "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."
>
> It sounds like I am misunderstanding what lat_ts does.  If it doesn't
do what I thought (cause 60N to be the latitude of true scale, where one
meter in map units equals one meter on the ground), what does it do?

Ed,

I stand corrected.  Lat_ts is indeed a supported parameter for eqc.  I
had
just never used it and didn't realize it was supported for that
projection.

I'll just shut up now. :-)

Best regards,
--
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up   | Frank Warmerdam,
[hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo,
http://osgeo.org
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Espen Isaksen
In reply to this post by Frank Warmerdam
 > 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.
>

Ok I understand this.

> 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.

Yes I am trying to change the projection such that it gets less
distorted in areas near the north pole. I tried to set the mapfile
like this:

EXTENT 593674.73 6669772.29 594581.49 6670417.57
PROJECTION
     "+proj=eqc +lat_ts=60 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84
+datum=WGS84 +no_defs +units=m"
END

which seems to create an quite ok map. Much better than setting
+lat_ts=0. Although I do not understand why Mapserver creates a map
over a different area than what my original decimal degree areas
indicates(I used proj to convert them)?

By the way my original decimal degree coordinates are:
10.6661 59.9155 10.6824 59.9213

Perhaps what I am doing is just nonsense...

Espen
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Espen Isaksen
To further discuss this topic. I created a map of Europe in a regular
EPSG:32662(proj=eqc) and one map of Europe with a latitude shift to 60
degrees north:

Map of Europe in 32662:
http://bildr.no/view/143324

Map of Europe with latitude shift:
http://bildr.no/view/143325

The latter is close to what I want. However, if I move my zoom in to
some part of the nordic countries, the decimal degree coordinates will
no longer correspond with my coordinates in my 32662 projection with
the latitude shift. Why is this?

Espen


On 16/01/2008, Espen Isaksen <[hidden email]> wrote:

>  > 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.
> >
>
> Ok I understand this.
>
> > 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.
>
> Yes I am trying to change the projection such that it gets less
> distorted in areas near the north pole. I tried to set the mapfile
> like this:
>
> EXTENT 593674.73 6669772.29 594581.49 6670417.57
> PROJECTION
>      "+proj=eqc +lat_ts=60 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84
> +datum=WGS84 +no_defs +units=m"
> END
>
> which seems to create an quite ok map. Much better than setting
> +lat_ts=0. Although I do not understand why Mapserver creates a map
> over a different area than what my original decimal degree areas
> indicates(I used proj to convert them)?
>
> By the way my original decimal degree coordinates are:
> 10.6661 59.9155 10.6824 59.9213
>
> Perhaps what I am doing is just nonsense...
>
> Espen
>
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Ed McNierney-4
Espen -

Yes, that should be what you expect.  If you change the latitude of true
scale, then you're changing the relationship between the size of a
degree of longitude at a given latitude.  Normally the line of 60
degrees North latitude is "stretched" horizontally to be larger than it
should be.  It is displayed so that it appears that one degree of
longitude (at that latitude) is the same size as one degree of longitude
at the Equator (instead of being only half as long).  That makes it
appear to be the same size as a degree of latitude and therefore you can
easily interpolate coordinates because they are the same size.

When you change the latitude of true scale to 60 degrees North, you are
making every degree of longitude equal 0.5 degrees of latitude, and you
can no longer treat them as simple X/Y coordinates to read latitude and
longitude.  You need to keep in mind that you are really using a
different projection, so your coordinate system is going to be
different.

        - Ed

-----Original Message-----
From: UMN MapServer Users List [mailto:[hidden email]] On
Behalf Of Espen Isaksen
Sent: Wednesday, January 16, 2008 5:41 PM
To: [hidden email]
Subject: Re: [UMN_MAPSERVER-USERS] Plate Carre with latitude shift

To further discuss this topic. I created a map of Europe in a regular
EPSG:32662(proj=eqc) and one map of Europe with a latitude shift to 60
degrees north:

Map of Europe in 32662:
http://bildr.no/view/143324

Map of Europe with latitude shift:
http://bildr.no/view/143325

The latter is close to what I want. However, if I move my zoom in to
some part of the nordic countries, the decimal degree coordinates will
no longer correspond with my coordinates in my 32662 projection with
the latitude shift. Why is this?

Espen


On 16/01/2008, Espen Isaksen <[hidden email]> wrote:
>  > 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.
> >
>
> Ok I understand this.
>
> > 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.
>
> Yes I am trying to change the projection such that it gets less
> distorted in areas near the north pole. I tried to set the mapfile
> like this:
>
> EXTENT 593674.73 6669772.29 594581.49 6670417.57
> PROJECTION
>      "+proj=eqc +lat_ts=60 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84
> +datum=WGS84 +no_defs +units=m"
> END
>
> which seems to create an quite ok map. Much better than setting
> +lat_ts=0. Although I do not understand why Mapserver creates a map
> over a different area than what my original decimal degree areas
> indicates(I used proj to convert them)?
>
> By the way my original decimal degree coordinates are:
> 10.6661 59.9155 10.6824 59.9213
>
> Perhaps what I am doing is just nonsense...
>
> Espen
>
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Espen Isaksen
Hi!

Sorry for not answering this for a day or so. First of all thanks to
Ed and Frank for helping me out on this one!

What you explain is what I figured happened. But I still do not quite
understand why proj cannot transform my coordinates to the new system
with the latitude shifted. I have read one similar e-mail on this list
from 2005(although I cannot find it now) which asked the same
question.

Espen

On 17/01/2008, Ed McNierney <[hidden email]> wrote:

> Espen -
>
> Yes, that should be what you expect.  If you change the latitude of true
> scale, then you're changing the relationship between the size of a
> degree of longitude at a given latitude.  Normally the line of 60
> degrees North latitude is "stretched" horizontally to be larger than it
> should be.  It is displayed so that it appears that one degree of
> longitude (at that latitude) is the same size as one degree of longitude
> at the Equator (instead of being only half as long).  That makes it
> appear to be the same size as a degree of latitude and therefore you can
> easily interpolate coordinates because they are the same size.
>
> When you change the latitude of true scale to 60 degrees North, you are
> making every degree of longitude equal 0.5 degrees of latitude, and you
> can no longer treat them as simple X/Y coordinates to read latitude and
> longitude.  You need to keep in mind that you are really using a
> different projection, so your coordinate system is going to be
> different.
>
>         - Ed
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:[hidden email]] On
> Behalf Of Espen Isaksen
> Sent: Wednesday, January 16, 2008 5:41 PM
> To: [hidden email]
> Subject: Re: [UMN_MAPSERVER-USERS] Plate Carre with latitude shift
>
> To further discuss this topic. I created a map of Europe in a regular
> EPSG:32662(proj=eqc) and one map of Europe with a latitude shift to 60
> degrees north:
>
> Map of Europe in 32662:
> http://bildr.no/view/143324
>
> Map of Europe with latitude shift:
> http://bildr.no/view/143325
>
> The latter is close to what I want. However, if I move my zoom in to
> some part of the nordic countries, the decimal degree coordinates will
> no longer correspond with my coordinates in my 32662 projection with
> the latitude shift. Why is this?
>
> Espen
>
>
> On 16/01/2008, Espen Isaksen <[hidden email]> wrote:
> >  > 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.
> > >
> >
> > Ok I understand this.
> >
> > > 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.
> >
> > Yes I am trying to change the projection such that it gets less
> > distorted in areas near the north pole. I tried to set the mapfile
> > like this:
> >
> > EXTENT 593674.73 6669772.29 594581.49 6670417.57
> > PROJECTION
> >      "+proj=eqc +lat_ts=60 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84
> > +datum=WGS84 +no_defs +units=m"
> > END
> >
> > which seems to create an quite ok map. Much better than setting
> > +lat_ts=0. Although I do not understand why Mapserver creates a map
> > over a different area than what my original decimal degree areas
> > indicates(I used proj to convert them)?
> >
> > By the way my original decimal degree coordinates are:
> > 10.6661 59.9155 10.6824 59.9213
> >
> > Perhaps what I am doing is just nonsense...
> >
> > Espen
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Ed McNierney-4
Espen -

I don't quite understand what you mean when you say "proj cannot transform my coordinates".  Could you explain exactly what it is you're trying to do, and what you think PROJ is or is not doing?

Please keep in mind that you have moved from a geographic coordinate system to a projected coordinate system, and that that is a material and substantial change.  It's not simply a matter of "shifting the latitude" but of actually projecting your data to an equirectangular projection with 60N as the latitude of true scale.  PROJ can certainly also transform coordinates in that projection back to a geographic coordinate system, but that's a separate task.  You're asking MapServer to create a projected output map, and that output map's coordinate system will, of necessity, be the projected coordinate system.

If you also need to display coordinates in a different coordinate system (such as latitude/longitude) then that is an additional task that you will need to do separate from the projection of your map image.

     - Ed

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

-----Original Message-----
From: UMN MapServer Users List [mailto:[hidden email]] On Behalf Of Espen Isaksen
Sent: Friday, January 18, 2008 11:17 AM
To: [hidden email]
Subject: Re: [UMN_MAPSERVER-USERS] Plate Carre with latitude shift

Hi!

Sorry for not answering this for a day or so. First of all thanks to
Ed and Frank for helping me out on this one!

What you explain is what I figured happened. But I still do not quite
understand why proj cannot transform my coordinates to the new system
with the latitude shifted. I have read one similar e-mail on this list
from 2005(although I cannot find it now) which asked the same
question.

Espen

On 17/01/2008, Ed McNierney <[hidden email]> wrote:

> Espen -
>
> Yes, that should be what you expect.  If you change the latitude of true
> scale, then you're changing the relationship between the size of a
> degree of longitude at a given latitude.  Normally the line of 60
> degrees North latitude is "stretched" horizontally to be larger than it
> should be.  It is displayed so that it appears that one degree of
> longitude (at that latitude) is the same size as one degree of longitude
> at the Equator (instead of being only half as long).  That makes it
> appear to be the same size as a degree of latitude and therefore you can
> easily interpolate coordinates because they are the same size.
>
> When you change the latitude of true scale to 60 degrees North, you are
> making every degree of longitude equal 0.5 degrees of latitude, and you
> can no longer treat them as simple X/Y coordinates to read latitude and
> longitude.  You need to keep in mind that you are really using a
> different projection, so your coordinate system is going to be
> different.
>
>         - Ed
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:[hidden email]] On
> Behalf Of Espen Isaksen
> Sent: Wednesday, January 16, 2008 5:41 PM
> To: [hidden email]
> Subject: Re: [UMN_MAPSERVER-USERS] Plate Carre with latitude shift
>
> To further discuss this topic. I created a map of Europe in a regular
> EPSG:32662(proj=eqc) and one map of Europe with a latitude shift to 60
> degrees north:
>
> Map of Europe in 32662:
> http://bildr.no/view/143324
>
> Map of Europe with latitude shift:
> http://bildr.no/view/143325
>
> The latter is close to what I want. However, if I move my zoom in to
> some part of the nordic countries, the decimal degree coordinates will
> no longer correspond with my coordinates in my 32662 projection with
> the latitude shift. Why is this?
>
> Espen
>
>
> On 16/01/2008, Espen Isaksen <[hidden email]> wrote:
> >  > 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.
> > >
> >
> > Ok I understand this.
> >
> > > 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.
> >
> > Yes I am trying to change the projection such that it gets less
> > distorted in areas near the north pole. I tried to set the mapfile
> > like this:
> >
> > EXTENT 593674.73 6669772.29 594581.49 6670417.57
> > PROJECTION
> >      "+proj=eqc +lat_ts=60 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84
> > +datum=WGS84 +no_defs +units=m"
> > END
> >
> > which seems to create an quite ok map. Much better than setting
> > +lat_ts=0. Although I do not understand why Mapserver creates a map
> > over a different area than what my original decimal degree areas
> > indicates(I used proj to convert them)?
> >
> > By the way my original decimal degree coordinates are:
> > 10.6661 59.9155 10.6824 59.9213
> >
> > Perhaps what I am doing is just nonsense...
> >
> > Espen
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Plate Carre with latitude shift

Espen Isaksen
Hi again!

This is what I try to do. I understand that I am now using a projected
coordinate system with 60N as my latitude of true scale.

First I create a mapfile using EPSG:4326 and output a map of a smaller
area from this mapfile. Then I take the same extent as as I use in my
geographic mapfile and put those coordinates in a textfile. Then I use
the following command to transform these coordinates to my new
projected coordinate system:

proj +proj=eqc +lat_ts=60 +lon_0=0 +x_0=0 +y_0=0 + ellips=WGS84
+datum=WGS84 +no_defs +units=m < test.txt

I get my new coordinates as my output. I then create a mapfile, now
using the projected coordinate system instead of EPSG:4326 and using
my new coordinates for my extent. Creating an output map for this
mapfile creates a map from a very different area than my former
mapfile using 4326.

Doing the same, just converting to UTM32 instead creates a map of the
same area as 4326 does. This leads me to believe that I am doing the
right thing with my mapfile.

Espen

On 18/01/2008, Ed McNierney <[hidden email]> wrote:

> Espen -
>
> I don't quite understand what you mean when you say "proj cannot transform my coordinates".  Could you explain exactly what it is you're trying to do, and what you think PROJ is or is not doing?
>
> Please keep in mind that you have moved from a geographic coordinate system to a projected coordinate system, and that that is a material and substantial change.  It's not simply a matter of "shifting the latitude" but of actually projecting your data to an equirectangular projection with 60N as the latitude of true scale.  PROJ can certainly also transform coordinates in that projection back to a geographic coordinate system, but that's a separate task.  You're asking MapServer to create a projected output map, and that output map's coordinate system will, of necessity, be the projected coordinate system.
>
> If you also need to display coordinates in a different coordinate system (such as latitude/longitude) then that is an additional task that you will need to do separate from the projection of your map image.
>
>      - Ed
>
> Ed McNierney
> Chief Mapmaker
> Demand Media / TopoZone.com
> 73 Princeton Street, Suite 305
> North Chelmsford, MA 01863
> [hidden email]
> Phone: +1 (978) 251-4242
> Fax: +1 (978) 251-1396
>