Re: Display and Navigate Image in IDL 8.2 [message #81360 is a reply to message #81350] |
Tue, 11 September 2012 08:28   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Alain writes:
> Several things:
>
> 1) by OVERLAY, I mean that both the image and the grid should be drawn at the same position in the window (through CURRENT and POSITION keywords).
Just curious, but what do you think they mean by OVERPLOT?
Clearly, it's not what I mean, but it must mean something. :-)
> 2) I found that keywords LONGITUDE/LATITUDE_MAX/MIN have same effect as LIMIT. You should use only one of them !
Well, this could be true, but if so it probably explains
why things are not working. As I read the documentation
(a futile activity, I know), the LONGITUDE/LATITUDE_MAX/MIN
keywords apply to the MapGrid object and locate the latitudes
and longitudes that should be drawn on the map. (And, this
is the way I am using them.) LIMIT should clearly apply to
the map projection space, NOT to the grid! I suppose you
*could* use the LIMIT to set the LONGITUDE/LATITUDE_MAX/MIN
values, but it would be wrong to do it the other way round.
(And the more I think about it, the more I think this could
be the source of all the errors I've been seeing.)
> 3) where your values "LONGITUDE_MIN=-105.18, LATITUDE_MIN=40.54"
> are coming from ? Please refer to my previous (saturday) post,
> for the recovery of the right (?) values.
Well, I'm not sure about "right (?)" values. I use them
so I can compare the results with the correct Coyote
Graphics display. I use them to locate the first drawn
grid line in the lat and lon directions. They certainly
seem to be doing the job for me.
> 4) I guess that your code should be:
>
> img = IMAGE(googleimage, POSITION=[0.05,0.15,0.95,0.95], DIMENSIONS=[700,700])
>
> mp = Map('Mercator', $
> ;set the overall projection
> ELLIPSOID='WGS 84', CENTER_LONGITUDE=clon, $
> TRUE_SCALE_LATITUDE=0d, $
> ;set the grid limits (you could use LIMIT too)
> LATITUDE_MIN=40.521578, LATITUDE_MAX=40.678329, $
> LONGITUDE_MIN=-105.20283, LONGITUDE_MAX=-104.99717, $
> ;set the grid appearance
> GRID_LONGITUDE=1./20, GRID_LATITUDE=1./30, LINESTYLE=1, $
> LABEL_POSITION=0, BOX_AXES=1, BOX_ANTIALIAS=1, $
> ;put the grid at the right place in the current window
> POSITION=[0.05,0.15,0.95,0.95], /CURRENT)
Except then I can't compare it to my other plot, which
I know from independent verification is correct. :-)
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.")
|
|
|