Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How might one export image(s) from image overlays in a KML file to a standard geo-referenced raster format like geotiff?

Use case: NASA's Earth Observatory has a time series of the changing Athabasca Oil Sands, (kml). It's hard to get a personally meaningful sense of scale from the line scale bar on those images, or from viewing the scale bar in Google Earth. So I'd like to superimpose things I'm familiar with, but to do that I need to have them in a more manipulable format, with scale.

(I know that for this particular use case I can get the source geo-referenced images from NASA and just sidestep the whole conversion issue. However it's the general question I'm interested in answers for.)

share|improve this question
add comment

3 Answers 3

Warning: untested hack ahead

A KML file is just another xml file with a special markup. The KML/KMZ format has been OGC standardized in 2008 and one can learn a lot by just opening and looking at them. In any case the reference is here.

In your case the Athabasca kml files shows a structure in which the base element is like the following:

<GroundOverlay>
        <name>201.png</name>
        <Region>
            <LatLonAltBox>
                <north>57.65625</north>
                <south>57.3046875</south>
                <east>-111.796875</east>
                <west>-112.1484375</west>
            </LatLonAltBox>
            <Lod>
                <minLodPixels>128</minLodPixels>
                <maxLodPixels>1024</maxLodPixels>
            </Lod>
        </Region>
        <Icon>
            <href>http://earthobservatory.nasa.gov/Feeds/GoogleEarth/athabasca_28/201.png</href>
        </Icon>
        <LatLonBox>
            <north>57.65625</north>
            <south>57.3046875</south>
            <east>-111.796875</east>
            <west>-112.1484375</west>
        </LatLonBox>
        <drawOrder>3</drawOrder>
    </GroundOverlay>

this element is repeated many times both in both a spatial and a time series.

I believe it should not be difficult to craft a script to fetch each of those Icon links and the create world files for each of them, thus in fact converting them into geotiffs. The process could use some help from the ImageMagick convert tool for png to tiff/jpeg conversion.

HTH.

share|improve this answer
add comment

I've found that the WorldFile Tool works quite well. I'm now looking at ways to 'batch' it so I don't have to do things manually with every file in a directory.

EDIT: Actually, I just found this shell script that appears to do exactly what I want (even using kmz rather than kml) and now I just need to get the 'unzip' command working in Windows!

share|improve this answer
    
It looks as though the world file tool is no longer available? –  Stephen Lead Mar 28 at 1:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.