comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » google earth projections
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: google earth projections [message #63992 is a reply to message #63180] Tue, 25 November 2008 09:15 Go to previous messageGo to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
<voorlandt@gmail.com> wrote in message
news:42eaa481-0a65-42e3-a5fd-4aeedb42aeaf@r40g2000yqj.google groups.com...
> Hi,
>
> I have been trying to overlay an IDL image on google earth, and it
> worked pretty well. One thing that would be really useful is to have
> IDL do a contour plot without introducing an extra border to the image
> (so I can directly import it in google earth). I have tried setting
> the position and region variable to [0,0,1,1], but to no avail. The
> extra border I am talking about can be seen here:
>
> http://www.dfanning.com/color_tips/contour_fill_2.jpg
>
> I am referring to the very thin black border between the image and the
> thin white boarder (not the thick black border).
>
> Here is a minimal example
> DEVICE, DECOMPOSED=0 & window,1,xsize=5000,ysize=2500
> MAP_SET, /Cylindrical , LIMIT = [-90, -180, 90, 180], Position=[0, 0,
> 1, 1]
> contour, zzzz, lond,latd ,/OVERPLOT,Position=[0, 0, 1, 1]
> MAP_CONTINENTS, Position=[0, 0, 1, 1] & Map_Grid, Position=[0, 0, 1,
> 1]
>
>
> Any help much appreciated!
>
> Voorlandt


I haven't done that explicitly, but here a blurb of code i used to make
google earth plots (with transparency).

set_plot,'z',/copy
device,set_resolution =[ 2000,1000]
; plot data right to the edges, for import to goog earth
saveregion = !P.region
!P.region = [0,0,1,1]
saveposition = !P.position
!P.position = [0,0,1,1]
savexmargin = !x.margin
!x.margin = [0,0]



mapStruct = MAP_PROJ_INIT(117, LIMIT=limit, $
CENTER_LONGITUDE=180)

PLOT, mapStruct.uv_box[[0,2]],mapStruct.uv_box[[1,3]] , $
/NODATA, ISOTROPIC=0, XSTYLE=5, YSTYLE=5,$
xtickname = blank_string(10),ytickname=blank_string(10),$
position = [0,0,1,1]

; NOTE: d = the data structure
result = MAP_PROJ_FORWARD(d.lon(wg(i)),d.lat(wg(i)),map_structure =
mapstruct)
x = result[0,*]
y = result[1,*]
plots,x,y,psym=3,/data,color = 100


create_png_transparent, outfilename
print,'creating ',outfilename
!P.region=saveregion ; restore previous region
!P.position = saveposition
!x.margin = savexmargin




where the png routine is just:

pro create_png_transparent,filename


if n_params() eq 0 then filename = 'idl_dump.png'
; capture the screen image
screendump = tvrd()
t = BytArr(256) + 255B
t[255] = 0
t[0] = 0 ; temp version here, for the swaths.
TVLCT, R, G, B, /GET
; write the screendump to a gif file
write_png,filename,screendump,r,g,b,transparent=t


end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: widget_tab: prevent switching?
Next Topic: Re: Filled contours + labels of different color

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 00:01:04 PDT 2025

Total time taken to generate the page: 0.01019 seconds