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.

I have a world georeferenced raster (5m resolution, ~4000 x 4000 pixels) that I would like to display in google earth. I am looking for a simple and effective way to generate this kml file.

  • Using ArcGIS layer to KML outputs a kmz and resample the raster (I went as far as 3000 dpi, but quality is still pretty low)
  • Using GDAL raster2tile is slower than ArcGIS, but it also resample the image, yielding low quality output (I do not know how or if it is possible to tweak dpi or quality).
  • Using R maptools::GE_SpatialGrid function gave the best results so far, as it simply outputs a xml file specifying the extent of the raster. Though it does not display fully in Google Earth (no error message).

To sum it up, my preferred method would be to output a kml file, that would be entirely displayed in google earth. I like the kml idea of simply specifying an extent, it is easy to update the raster without any more processing.

share|improve this question
add comment

4 Answers 4

I had the same problem today. Using the built-in Layer to KML tool and XTools didn't produce a nice image. But i brought in my georeferenced image into Global Mapper and it worked much better without any blurriness.

Edit: I created the KML/KMZ in Global Mapper. I loaded the JPG, then used File, Export, Export Web Format. I checked on the Super Overlay Setup option so that the KMZ will tile the output automatically to 1024x1024 pixels.

KML Export

share|improve this answer
1  
Did you create a KML is Global Mapper? or just view the data in Global Mapper? This is not clear from your answer. –  Devdatta Tengshe Jul 8 at 3:15
add comment

It's a very easy task using the simplekml Python package. Here's a nice Ground Overlay example from its documentation:

import simplekml
kml = simplekml.Kml()
ground = kml.newgroundoverlay(name='GroundOverlay')
ground.icon.href = 'http://simplekml.googlecode.com/hg/samples/resources/smile.png'
ground.gxlatlonquad.coords = [(18.410524,-33.903972),(18.411429,-33.904171),
                              (18.411757,-33.902944),(18.410850,-33.902767)]
# or
#ground.latlonbox.north = -33.902828
#ground.latlonbox.south = -33.904104
#ground.latlonbox.east =  18.410684
#ground.latlonbox.west =  18.411633
#ground.latlonbox.rotation = -14
kml.save("GroundOverlay.kml")
share|improve this answer
add comment

Have you tried the MicroDEM? It's free, and I have heard it works great at this, but have not used it myself. http://www.usna.edu/Users/oceano/pguth/website/microdem/microdem.htm

share|improve this answer
add comment

You need to create SuperOverlays using the GDAL tools (gdal2tiles)

Creating SuperOverlays

enter image description here

continues here:

https://developers.google.com/kml/documentation/regions#superoverlays

Here is good guide for gdal2tiles and creating KML SuperOverlays:

https://developers.google.com/kml/articles/raster

share|improve this answer
    
Thank you, but as I said above, the resampling available with raster2tile (I've tried average, cubicspline and laczos) yield a blured image. Maybe it's because the original raster is quite high frequency (speckeled, if I can say). –  Etiennebr Mar 30 '12 at 16:50
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.