Re: Box Axes with Map Function [message #82328 is a reply to message #82209] |
Tue, 04 December 2012 10:10   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Fab writes:
> That's just a personal opinion (I am working in the atmospheric
> sciences) but if I had to make a list on how to make a georeferenced
> plot look like the way I want it, I would check (in this order):
> - cg* routines (if I have an IDL licence)
> - NCL http://www.ncl.ucar.edu/
> - Python's basemap kit http://matplotlib.org/basemap/users/examples.html
>
> (it's just that GradS plots look a bit ... old ;-))
Oddly, I am trying to learn how to work with Function
Graphics map projections because Map_Grid (and, by
extension, cgMap_Grid) is driving me CRAZY!!
Map_Grid is designed to work with Map_Set. It is
extremely inadequate when you use it with Map_Proj_Init,
at least for map projections that don't cover the entire
earth.
Since I never use Map_Set, unless under extreme duress,
I have had to modify Map_Grid to make it work more
adequately with Map_Proj_Init, which I always use
to define my map projection space. As long as my map
projection does not cover the entire globe, cgMap_Grid
works great. As soon as I use it on a global map projection,
it screws up. If I fix it to work with global projections,
it screws up non-global projections. I'm always poking at
the darn thing.
I was hoping that function graphics map commands, because
they use Map_Proj_Init (at least I assume they do, since
bugs have been fixed in this routine lately), would probably
get the grids working correctly. For the most part, this
seems to be true.
But, if you total up all the time it has taken me to get
a simple map created in what I think of as the "correct"
way in function graphics, then I could have probably
rewritten Map_Grid 10 times over! And, debugged it, too!
I guess, I might have done this, except that I have a
sneaking suspicion that the problem is not in Map_Grid,
but in Map_Proj_Init. If you make a map projection in
which the longitudes run from -180 to 180 degrees, centered
at 0 degrees longitude, then in projected XY meters, you
should have negative values to the left and positive values
to the right. Map_Proj_Init will do this correctly, until
you get to the right edge of the projected XY space, when
the last value will go negative on you to match the value
at the left edge.
You could argue that this is the same point, and so the
sign of the value doesn't matter. Except that it DOES
matter if you are trying to draw a line (think "grid")
from one part of the map to the other. That, in essence
is the problem I've been trying to solve.
I guess map makers have had this problem for eons, but
I still haven't figured out how to solve it correctly
in IDL. I'm open to ideas. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|