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

Home » Public Forums » archive » Creating a .kml file from data with a geostationary map projection
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Creating a .kml file from data with a geostationary map projection [message #92036] Fri, 02 October 2015 05:21 Go to next message
ian.j.ashpole is currently offline  ian.j.ashpole
Messages: 5
Registered: September 2012
Junior Member
Hi all,

I have some data that i would like to be able to display in Google Earth. The data are in geostationary map projection, and i understand from reading around (predominantly here: http://www.idlcoyote.com/cg_tips/image2kml.php) that these need to be reprojected to an equirectangular map projection first. Unfortunately, this is where i come unstuck! If anybody would be able to help me with this it would be most appreciated.

Data that i would like to plot are here (netcdf format):
https://www.dropbox.com/s/49ri4ib7rju0j0s/data_to_plot.nc?dl =0

The lon,lat values for each cell in that file are here:
https://www.dropbox.com/s/m53d2tn6ccd6jto/lonlats.NA_MiddleE ast.nc?dl=0

Thanks,
Ian
Re: Creating a .kml file from data with a geostationary map projection [message #92039 is a reply to message #92036] Fri, 02 October 2015 07:40 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ian.j.ashpole@gmail.com writes:

> I have some data that i would like to be able to display in Google
Earth. The data are in geostationary map projection, and i understand
from reading around (predominantly here:
http://www.idlcoyote.com/cg_tips/image2kml.php) that these need to be
reprojected to an equirectangular map projection first. Unfortunately,
this is where i come unstuck! If anybody would be able to help me with
this it would be most appreciated.
>
> Data that i would like to plot are here (netcdf format):
> https://www.dropbox.com/s/49ri4ib7rju0j0s/data_to_plot.nc?dl =0
>
> The lon,lat values for each cell in that file are here:
> https://www.dropbox.com/s/m53d2tn6ccd6jto/lonlats.NA_MiddleE ast.nc?dl=0

I read the data into the variables, bt, lons, and lats. Then, as a quick
and dirty exercise, I did this:

i = where(lons le 360 and lats le 90)
img = cgwarptomap(bt[i], lons[i], lats[i], Resolution=[1331, 605], $
Map=imgmap, /SetRange) ; took a few seconds to grid
cgloadct, 33
cgdisplay, aspect=img
cgimage, img, /scale, /keep, xrange=imgmap.xrange, $
yrange=imgmap.yrange, /save
snap = cgsnapshot()
cgimage2kml, snap, imgmap, transparent=50

Opened the resulting KML file in Google Earth. Looks promising. :-)

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.")
Re: Creating a .kml file from data with a geostationary map projection [message #92165 is a reply to message #92039] Thu, 22 October 2015 10:00 Go to previous message
ian.j.ashpole is currently offline  ian.j.ashpole
Messages: 5
Registered: September 2012
Junior Member
Hi David,
Thanks very much for your reply and effort - i've only just seen it, as notifications have been switched off for some reason! I'll work through your suggestion and see how i do.
Many thanks again
Ian
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL equivalent to MATLAB's linkaxes
Next Topic: IDL 8.5's HDF version and HDF5 version

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

Current Time: Wed Oct 08 13:47:58 PDT 2025

Total time taken to generate the page: 0.00476 seconds