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

Home » Public Forums » archive » Maps - ellipsoids in map_set ('scale on the central meridian')
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Maps - ellipsoids in map_set ('scale on the central meridian') [message #87220] Thu, 16 January 2014 10:58 Go to next message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
I have been trying to use the WGS 84 ellipsoid with map_set, to map some data at a higher resolution than I normally work at. However, according to the documentation, the default ellipsoids are something else, so I need to know some parameters (which I think may explain why my coastlines are not currently lining up where they should):

http://www.exelisvis.com/docs/MAP_SET_Procedure.html

"ELLIPSOID
Set this keyword to a 3-element array, [a, e2, k0], defining the ellipsoid for the Transverse Mercator or Lambert Conic projections.
a: equatorial radius, in meters (a must be greater than zero)
e2: eccentricity squared. e2= 2 * f - f2, where f = 1 - b/a (a: equatorial radius, b: polar radius; in meters). e2 must be nonnegative and less than 1.
k0: scale on the central meridian
The default is the Clarke 1866 ellipsoid, [6378206.4, 0.00676866, 0.9996].
This keyword can be used with the CONIC or TRANSVERSE_MERCATOR keywords. For CONIC if ELLIPSOID is not supplied, a sphere of normalized radius 1.0 is used. For TRANSVERSE_MERCATOR if ELLIPSOID is not supplied, the default is the Clarke 1866 ellipsoid, [6378206.4, 0.00676866, 0.9996]."

From Wikipedia I have found the following: http://en.wikipedia.org/wiki/World_Geodetic_System

"The WGS 84 datum surface is an oblate spheroid (ellipsoid) with major (equatorial) radius a = 6378137 m at the equator and flattening f = 1/298.257223563.[6] The polar semi-minor axis b then equals a times (1-f), or 6356752.3142 m.[6]"

So, from that I have parameter a and can calculate e2. However, not being an expert in this terminology (something I am trying to get better about), I don't know what the parameter k0 ('scale on the central meridian') means - could anyone help me out? I also looked at the map_proj_init documentation (as that has various ellipsoid options) but didn't spot mention of a 'scale on the central meridian' there. The mapping code I am using is built around map_set so 'use map_proj_init' would not be the ideal response to this.

Should it be 1, 0.9996 like Clarke, or something else?

Thanks,

Andy
Re: Maps - ellipsoids in map_set ('scale on the central meridian') [message #87221 is a reply to message #87220] Thu, 16 January 2014 11:01 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
AMS writes:

> The mapping code I am using is built around map_set so 'use map_proj_init' would not be the ideal response to this.

Oh, too bad. :-(

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.")
Re: Maps - ellipsoids in map_set ('scale on the central meridian') [message #87222 is a reply to message #87221] Thu, 16 January 2014 12:28 Go to previous messageGo to next message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
I suspected you might say that, David!

Andy

On Thursday, January 16, 2014 2:01:36 PM UTC-5, David Fanning wrote:
> AMS writes:
>
>
>
>> The mapping code I am using is built around map_set so 'use map_proj_init' would not be the ideal response to this.
>
>
>
> Oh, too bad. :-(
>
>
>
> 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.")
Re: Maps - ellipsoids in map_set ('scale on the central meridian') [message #87223 is a reply to message #87222] Thu, 16 January 2014 13:09 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
AMS writes:

> I suspected you might say that, David!

Well, aside from MAP_SET just being generally terrible for doing
professional map projection stuff, are you sure you are using the HI-RES
continental outlines? Is this the kind of thing that can be improved
with the GSHHS data?

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.")
Re: Maps - ellipsoids in map_set ('scale on the central meridian') [message #87224 is a reply to message #87223] Thu, 16 January 2014 13:24 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

>
> AMS writes:
>
>> I suspected you might say that, David!
>
> Well, aside from MAP_SET just being generally terrible for doing
> professional map projection stuff, are you sure you are using the HI-RES
> continental outlines? Is this the kind of thing that can be improved
> with the GSHHS data?

Incidentally, (this probably won't help you all that much) but I updated
cgMap_Grid today with the keywords BThick, to allow the thickness of the
box drawn when drawing box axes to be under user control, and BLabel,
that allows the user to control how labels are applied to box axes.
BLabel=0 labels all four axes, the default. 1 labels just the left and
bottom sides, 2 labels the top and right sides of the box.

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.")
Re: Maps - ellipsoids in map_set ('scale on the central meridian') [message #87227 is a reply to message #87223] Thu, 16 January 2014 14:14 Go to previous messageGo to next message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
Actually I was adding the continental outlines after mapping with map_continents (and using /hires and /coast) rather than during map_set.

I experimented a bit with different ellipsoids (guessing 1 and 0.9996 for this mysterious third parameter) but it didn't seem to make a visible difference. So either I am doing it wrong (possible), or the difference between Clarke and WGS 84 ellipsoids is smaller than one data pixel (~100 m).

I'm planning to try the GSHHS stuff in the morning... we will see! But I would really not expect that would make such a difference (~1-2 km mismatch). Then again as the IDL maps don't recognise some countries which have existed for over a decade now, perhaps I should not be surprised. ;)

Andy

On Thursday, January 16, 2014 4:09:19 PM UTC-5, David Fanning wrote:
> AMS writes:
>
>
>
>> I suspected you might say that, David!
>
>
>
> Well, aside from MAP_SET just being generally terrible for doing
>
> professional map projection stuff, are you sure you are using the HI-RES
>
> continental outlines? Is this the kind of thing that can be improved
>
> with the GSHHS data?
>
>
>
> 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.")
Re: Maps - ellipsoids in map_set ('scale on the central meridian') [message #87230 is a reply to message #87227] Fri, 17 January 2014 06:34 Go to previous message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
The mystery thickens. The GSHHS shoreline database overlays the IDL one almost exactly for my image, so that's not it. I still can't get changing ellipsoids to make a noticeable difference so I am either doing it wrong or it is a sub-pixel shift. I used Google Earth to cross-reference the apparent position of features in the images and IDL's coastlines, and find that the 'true' positions (according to Google Earth are somewhere in between: there is roughly a 0.01 degree difference.

So I wonder if perhaps this image is misregistered, AND the shoreline databases are a little off. Perhaps when I am having problems on scales of 0.01 degrees I am expecting too much but having not worked with this resolution of data near coasts before I don't know if this is considered an 'acceptable' level of error or not.

Andy

On Thursday, January 16, 2014 5:14:10 PM UTC-5, AMS wrote:
> Actually I was adding the continental outlines after mapping with map_continents (and using /hires and /coast) rather than during map_set.
>
>
>
> I experimented a bit with different ellipsoids (guessing 1 and 0.9996 for this mysterious third parameter) but it didn't seem to make a visible difference. So either I am doing it wrong (possible), or the difference between Clarke and WGS 84 ellipsoids is smaller than one data pixel (~100 m).
>
>
>
> I'm planning to try the GSHHS stuff in the morning... we will see! But I would really not expect that would make such a difference (~1-2 km mismatch). Then again as the IDL maps don't recognise some countries which have existed for over a decade now, perhaps I should not be surprised. ;)
>
>
>
> Andy
>
>
>
> On Thursday, January 16, 2014 4:09:19 PM UTC-5, David Fanning wrote:
>
>> AMS writes:
>
>>
>
>>
>
>>
>
>>> I suspected you might say that, David!
>
>>
>
>>
>
>>
>
>> Well, aside from MAP_SET just being generally terrible for doing
>
>>
>
>> professional map projection stuff, are you sure you are using the HI-RES
>
>>
>
>> continental outlines? Is this the kind of thing that can be improved
>
>>
>
>> with the GSHHS data?
>
>>
>
>>
>
>>
>
>> 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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: case study of digital cell phone
Next Topic: Plotting with colorbar

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

Current Time: Wed Oct 08 11:41:35 PDT 2025

Total time taken to generate the page: 0.00312 seconds