Re: Mapping questions [message #31175] |
Thu, 20 June 2002 20:33  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
NSTSMT (nstsmt@aol.com) writes:
> I am new to IDL, and am hoping someone can point me in the right direction to
> accomplish the following 3 tasks. Any advice would be greatly appreciated.
>
> Task 1: Start with a globe and some form of overlay to show land forms. Allow
> the user to zoom in on an area, and show more detail in the map.
If you know how the Globe demo works, you know more than I
do. But the general way you would "zoom" into something
is get the two endpoints of your "zoom box" in lat/lon
coordinates, and use these to set your map projection
space. This would be quite easy in direct graphics,
where map projections are reasonably well defined. I don't
know how you would do it in the Globe demo object graphic
space. It would be harder, I'm pretty sure of that.
You can look at a program like Zoombox from my program
library to see how to do the rubberband box for zooming.
http://www.dfanning.com/programs/zoombox.pro
I'd probably start with direct graphics and an orthographic
map projection. Zooming into that should be fairly straightforward,
I think.
> Task 2: After zooming to a specific area (say Alabama), I have image data that
> has a associated pixel map that has the UTM coordinates for each and every
> pixel from the image. I would like to plot on the map the location of each
> pixel(or really just the outer edge of the image which do to motion is not a
> square)
IDL doesn't lend itself to this sort of thing, really.
You might have a look at IMAGEMAP on Liam Gumley's web
page. This is the sort of thing you will want to do.
http://cimss.ssec.wisc.edu/~gumley/imagemap.html
> Task 3: I also have some annotations to apply to the map. At a given latitude
> and longitude, I want to draw a circle with a radius of 1.0 nautical miles.
>
> Any thoughts on how to accomplish any of this? I looked at the globe demo, and
> I understand how that works, but I dont know how to zoom.
Well, I do happen to know something about this. :-)
If you want a circle, you will have to draw an ellipse.
This is because a nautical mile is 0.01667 degrees of
latitude and (0.016667 / Cos(lat) ) degrees of longitude.
So the radius of your "circle" is different in the two
directions. Hence, an ellipse.
I've used the ELLIPSE program I found in the JHUAPL library
to do this sort of thing.
http://fermi.jhuapl.edu/s1r/idl/s1rlib/local_idl.html
Good luck!
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Mapping questions [message #31312 is a reply to message #31175] |
Sun, 23 June 2002 11:32  |
nstsmt
Messages: 3 Registered: June 2002
|
Junior Member |
|
|
Thanks for the help. I made some progress, using direct graphics, and think
that I know what I need to do to get the zooming working. For item 2, I dont
want to actually display the image, but rather put a plot of the area of
coverage on the map. I think I figured this out also.
For the ellipse, I am still having trouble. I looked at the ellipse program
that you suggested, and I can not get it to work. I am misunderstanding what
input to give it. What I tried to do was give it the end points of the major
axis, and the minor axis, but that didnt seem to work. Any suggestions?
Thanks
Neil
|
|
|