5

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.)

1

3 Answers 3

1

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!

4
1

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.

0

Have a look at this post on a french board, about such tools

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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