For the last few weeks I've been making .kmz files using LayerToKML_Conversion with no problem. They open in Google Earth perfectly.

Today, they suddenly stopped rendering at all. When I click the .kmz file, Google Earth opens and renders the map, but my KML doesn't appear. There are no error messages. The name of the .kmz file appears in 'Temporary Places' like normal, but doesn't actually appear (it should zoom in to Tanzania and render some yellow outlines):

enter image description here

I haven't changed anything at all in my code, it's just two lines of text:

import arcpy
arcpy.LayerToKML_conversion('PreHex280_merged', 'C:/Users/alell/Desktop/PreHAN_Control_hex280/final.kmz')

It started rendering when I added is_composite=True to the code, but it renders in a very low-res fashion that is not very useful.

enter image description here


When you tell ArcGIS' Layer to KML tool to export a composite, it flattens all your data into a single image overlay. That means that any vector layers you had will now be combined with any rasters into a raster KML. If I remember correctly, ArcGIS exports the raster overlay at 2048x2048 pixels by default, which is quite small, and probably why it appears to render "low res". It uses 2048px square since that's the biggest size that just about every Google Earth can render on the map. Many can render larger images (often 16k px or more), if the computer has good graphics capabilities, but 2048px is a default that should work everywhere. There might be a way to force it to export a larger image for the overlay, but you should probably first figure out if you really want to use the composite export at all. If you have a lot of data that won't export well to a "normal" kml vector format, then it might be a good idea. Otherwise, you might want to go back to doing it without the composite. If you tell us a bit about your data and what you're trying to achieve we might be able to provide more suggestions.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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