Re: Map Projection [message #86269 is a reply to message #86267] |
Tue, 22 October 2013 08:08   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Morgan Silverman writes:
> I'm trying to create a basic plot with a map of the US and trajectory data plotting on top. I'm trying to follow the map projection method using mapCoord = Obj_New('cgmap', 'Lambert Azimuthal', Limit=limit).
>
> I keep coming across an ellipsoid statement in most of the examples I've found but I can't find any explanation as to what it is. Different examples have use ellipsoid=24, ellipsoid=19, ellipsoid=WGS84, etc...I don't know if I need this or how to set it if I do.
>
> Can someone please explain what the ellipsoid statement is?
When most people come to maps for the first time they believe what they
learned in grade school: that every point on the Earth can be described
with a latitude and longitude value. Which is true. But what they
*don't* tell you is that no point on the Earth has a *unique* latitude
and longitude value. What you are calling *this* latitude and *this*
longitude depend on what reference standard you are using. This is
called a "datum", or in your case, the "ellipsoid".
If you use a GPS device to find your location on the Earth, it is
probably being calculated with a WGS84 ellipsoid, the standard ellipsoid
for most satellite data. If you plot that point on a map projection
using a spherical ellipsoid (the default ellipsoid for many map
projections) then the point you place on the map projection to
illustrate your position will NOT be the point on the Earth where you
are standing! You can be many, many meters off, simply because you are
using different reference ellipsoids to calculate latitude and
longitude.
> And, is mapCoord=Obj_New('cgmap', ....) the best way to go about
plotting a map of the United States?
It has pretty much always worked for me. :-)
The nice thing about cgMap is that is *doesn't* work in lat/lon space,
where people coming to map projections for the first time think you are
suppose to be working. It works in projected meter space, which is a
MUCH better place to be in if you are working with rectangular map
projected images.
If you are trying to put data on top of a coordinate system set up with
cgMap, you are going to have to pass the coordinate system object to
whatever routine (cgContour, cgPlotS, etc.) you are using, so it knows
how to convert the lat/lon values you are trying to plot into the
projected meter values of the coordinate system.
If this seems beyond your abilities, then I would simply use cgMap_Set
to set up the map and keep working in lat/lon. It's not ideal. But, it
often works well enough for the purpose.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|