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

Home » Public Forums » archive » Image Overlays on Google Earth with KML Files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Image Overlays on Google Earth with KML Files [message #81876] Tue, 30 October 2012 15:36 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I don't get really excited about IDL too much these days.
Except, of course, when a new release comes out, but those
moments are fleeting and almost immediately followed by
disappointment, so maybe they don't count.

I'm excited today, though.

Someone asked a week or so ago about creating KML files
from IDL, so that they could display them on Goggle Earth.
When I read the request I immediately realized how such a
capability would be valuable for the work I am doing, too.
So, I have been thinking about it ever since.

KML files are hierarchtical, so I immediately thought
about an object hierarchy approach. Over the weekend,
I started to put some of this object framework together.
There is a LOT more work to do, but I built just enough
to be able to create ground overlays from images in IDL.
Such images are draped onto the terrain map in Google Earth.

The exciting thing to me (as always!) is how nicely the
Coyote Graphics routines just lend themselves to doing
the next, new thing. It's like magic sometimes. But small
tweaks to the Coyote map routines to return map boundaries
in Goggle Earth preferred formats, and a new routine to
warp images in other map projections to the Google Earth
map projection (otherwise images won't align with Google
Earth continental boundaries, etc.) was almost too easy.

I also wrote a cgImage2KML program so those of you
terrified of objects can just ignore the darn things.
Who cares what's going on under the hood! :-)

The cgImage2KML program can use image variables, etc.
But, most of my images are in GeoTiff files, so the
routine is written to gather information from the
GeoTiff file directly. If you want to try this out,
you can use the AVHRR NDVI image from my web page.
You can find it here:

http://www.idlcoyote.com/data/AF03sep15b.n16-VIg.tif

Here is how you create a KML file with it. I'm using
a color table and displaying the image with 50%
transparency. The KML file will be named avhrr_ndvi.kml.

cgImage2KML, GeoTiff='AF03sep15b.n16-VIg.tif', Min_Value=0, $
CTIndex=11, /Brewer, /Reverse, Transparent=50, $
Filename='avhrr_ndvi.kml', $
Description='AVHRR NDVI Data from Africa'

Once the file is created, simply start Google Earth and open
the file. I haven't implemented a "goto" capability yet,
so you will have to rotate the Earth to see Africa, probably.
But, I'll have this fixed by tomorrow, no doubt.

Did you ever see anything more beautiful!? And perfectly aligned!
Wow! Blows me away.

You will need new files:

http://www.idlcoyote.com/programs/zip_files/coyoteprograms.z ip

I have LOTS of ideas for more functionality. If you have ideas of your
own, let me know. Check back often because I am sure there are bugs
and I know there will be many, many changes as I start to use these
programs at work.

Documentation for all these routines is available on-line:

http://www.idlcoyote.com/idldoc/cg/index.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL sav files and console output (IDL 8.2)
Next Topic: Re: Make the plots invisible

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

Current Time: Wed Oct 08 15:06:01 PDT 2025

Total time taken to generate the page: 0.00395 seconds