Raster to KML problem

17136
8
06-04-2010 02:27 PM
JohnNiles
New Contributor III
I am attempting to convert a georeferenced jpeg image into a KML in order to view in Google Earth. When I perform this conversion using the default settings, the output is a tiny (<100 KB) file that will open in GE, but is extremely pixelated and missing information.

The optional settings under "OUTPUT IMAGE PROPERTIES" include two ambiguous parameters called: "Size of returned image (pixels)", and "DPI of output image".

What exactly does  "Size of returned image (pixels)" mean? The help documentation describes it as defining the "vertical and horizontal resolution of any rasters in the KML document". So, if the image being converted is 10800 x 14840 then what in the world should the size be set at? I have tried using units with that order of magnitude and the result will not open in GE.

Does "DPI of output image" somehow imply resolution? The help documentation says that it defines "the device resolution for any rasters in the KML document". It seems that that was addressed in the previous field. Changing this value has no appreciable effect on the output, as far as I can tell.

This seems like a much simpler process that it has proven to be. Any help would be appreciated.
0 Kudos
8 Replies
JohnNiles
New Contributor III
No, I have not. With the popularity of Google Earth, I'm really surprised there isn't more information out there on this function.
0 Kudos
JohnNiles
New Contributor III
Anyone...?
0 Kudos
MelanieHarlow
Esri Contributor
You are going to encounter a couple of issues by trying to open this image in Google Earth. The biggest issue I�??ve learned about is this application limits the size of image files it supports to 2048 rows and columns.
So even if you specified the larger dimension of your image (14840) as the �??Size of returned image (pixels)�?� the tool would generate a result but you would not successfully see it within Google Earth.
I have found three recommended solutions.

  1. You can break your JPEG image into smaller chunks (2048x2048) and then add them into ArcMap and save the mxd. (There is a new tool in version 10 called Split Raster that will do this.) Then use the Map To Layer tool to export the content.

  2. The issue with this is you may end up with lines between your chunks when you view it in Google Earth. At least, this is what I keep seeing.
  3. You can serve the JPEG image as an image service using ArcGIS Server and via the Service Directory you can open it in Google Earth, or save the kmz to your desktop to share it.

  4. This worked successfully for me.
  5. Use ArcGIS Explorer 🙂

0 Kudos
CesarBorges
New Contributor
I tried lowering the resolution to 2048 and it did not work all that well for me.  There seems to be a lot of compression within the image and cells tend to overlap.  I even tried lowering the resolution to 500 for the split and I still don't get the desired edge sharpness. 

Is there a way to overcome this in a setting?

There needs to be more of a description on what the DPI does and the limits on resolution for export to Google Earth.
0 Kudos
DavidBirkigt
New Contributor III
This is an old forum, but I use SAFE FME to do all my conversions to KML and KMZ, http://www.safe.com/ of course you need to pay for this software, but it can convert multipatch file geodatabases (3Dish), raster and vector easily with lots of control.

David
0 Kudos
KevinHibma
Esri Regular Contributor
ArcGIS 10 does indeed support raster into KML conversion.
It can be tricky though. You're basically taking a snap shot of the raster as we use the GroundOverlay mechanism in KML to display these rasters. So you may need to try a few exports with the differing export options to fine tune your KML.

As Melanie points out, you may want to chop up your raster.
The best explanation of rasters inside KML can be found here: http://code.google.com/apis/kml/documentation/regions.html starting at the 'Super-Overlays' section. It explains how the pixels of the image(s) works within KML clients.
0 Kudos
MatthewGardner1
New Contributor

This is very simple to do using QGIS using the OSGEO4W shell.

Simply open the OSGEO4W shell and run the following command line

gdal_translate -a_nodata 0 -of KMLSUPEROVERLAY -co FORMAT=PNG INPUTFILENAME.tif OUtputfilename.kmz

0 Kudos
RexRobichaux2
Occasional Contributor II

I've also had great luck exporting a raster layer from an .mxd to kml / kmz using the custom tool found here (I didn't create this or know who did): wankoelias / MapToGarminCustomMap — Bitbucket 

It seems to do a good job of preserving raster resolution in the output, and can be ran straight from ArcCatalog inside of an ArcMap session. Just download and unpack the tool / toolbox locally, navigate to it in Catalog and give it a shot. Hope this helps!

-Rex

0 Kudos