Re: Overlaying continent outlines over cgimage? [message #83466] |
Mon, 04 March 2013 16:05 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Lisa08 writes:
> I am pretty new to mapping in IDL and have not been able to plot
continent outlines (or a transparent image of the continents) over an
image of data. It always gets overwritten. I have a mask of cloud data
of size:
>
> cloud_mask=Byte[3000,1800]
>
> where the values of the variable are 0 and 1 (0=no cloud , 1=cloud was detected).
>
>
> I want to plot this mask of data and then overlay continent outlines over it. So far, what I have tried to plot the variable is:
>
> cgimage, cloud_mask ;which plots the image of data
>
> Then, I thought I could use something like this to plot continents over it:
> cgMap_Set, /Mercator
> cgMap_Continents, /Coasts, Color='white'
>
> However, since the cgimage command has an overplot keyword I tried to do it backwards (plot the continents first and then overlay the cloud_mask data over it) but it always gets overwritten.
>
> Is this possible or is there something better than cgimage to try to do what I want? Any suggestions on how I can try to do this?
>
> Any help would be greatly appreciated!
I would try something like this:
pos = =[0.1, 0.1, 0.9, 0.9]
cgMap_Set, /Mercator, Position=pos
cgImage, data, Position=pos
cgMap_Continents, /Coasts, Color='white'
I'd be careful with the Mercator projection, though. It's strange, and
often wrong:
http://www.idlcoyote.com/map_tips/badmercator.html
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.")
|
|
|