comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Map Projection
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Map Projection [message #86277 is a reply to message #86276] Tue, 22 October 2013 10:45 Go to previous messageGo to previous message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
I'd echo the previous suggestion of regular map_set and map_continents above as a simple(r) way to draw a map, unless you're trying to do something fancy.

Andy

On Tuesday, October 22, 2013 1:25:03 PM UTC-4, Morgan Silverman wrote:
> On Tuesday, October 22, 2013 11:08:04 AM UTC-4, David Fanning wrote:
>
>> 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.")
>
>
>
> Thank you for the explanation. I'm still not sure how to determine what the ellipsoid should be though. I used 19 in my code based on one of your gallery examples but I don't know if that would be correct. I'm plotting model back-trajectories over the map.
>
>
>
> mapCoord = Obj_New('cgmap', 'Equirectangular', Ellipsoid=19, Limit=limit, $
>
> xrange=xrange, yrange=yrange, /latlon_ranges, center_lon=centerlon, position=pp)
>
> mapCoord -> Draw
>
> cgMap_Grid, map=mapCoord, /box
>
> cgMap_Continents, map=mapCoord, /continents, /countries, /usa
>
> cgplots, lon_1500(index), lat_1500(index), map=mapCoord
>
>
>
> Thanks.
>
> -Morgan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Better (updated) political boundaries on maps?
Next Topic: timegen

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 04:13:51 PDT 2025

Total time taken to generate the page: 0.48031 seconds