Re: map projections webinar [message #78022 is a reply to message #77920] |
Thu, 20 October 2011 19:19   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> I discovered the work-around for the broken POSITION
> keyword by listening to Mark Piper's map projection
> webinar this afternoon.
>
> Apparently, you can use the Scale and Translate methods
> for the MAP function to effect a rudimentary positioning
> of the map projection in the graphics window. > ...
> I still don't see how to set the limit of the map projection,
> so that I just see the portion of it that I want to see.
> It is difficult to move forward because so many keywords just
> seem to be broken. (At least they appear to be ignored. I presume
> they are broken.)
Well, I wish I hadn't had to spend two full days on this,
but I have *finally* figured out how to get what I want
out of the function graphics map projection routines.
My initial approach was to create a map object and try
to add an image to that. That is NOT the way to proceed
using function graphics! I am not sure what is wrong with
the Map() function, but if you try to create it first,
it is absolutely impossible to control. It would appear
(from LOTS of experimenting) that the POSITION, LIMIT,
XRANGE, and YRANGE keywords are all broken.
I'm not absolutely *sure* they are broken, because they
appear to work correctly if used in another context
(see below), but I know for sure creating a Map()
object first is a BIG mistake!
The proper way to proceed is to create an image object
and add the map projection stuff to that. Doing just
that suddenly causes a lot of things that previously
appeared broken to magically work! I don't mean work
in the way you expect them to work, necessarily, but
they work well enough that you suspect there might
be some intelligence at work somewhere, whereas
before... Well, it does no good to go there. :-)
I've written an article that explains how one could
navigate a geoTiff image in such a way as to annotate
it with continental outlines and map grids in both
Coyote Graphics and in Function Graphics.
http://www.idlcoyote.com/map_tips/geotiffan.php
Oddly enough, the function graphics approach is
simpler and I have to say it is about the first thing
I've seen in this graphics system that gives me reason
to think I might actually use it some day. Although,
when you compare it to the Coyote Graphics approach
you are probably going to be dismayed at its speed
(or, rather, lack of it!). In any case, it's a ray
of hope in an otherwise dark sky. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|