I need assistance modifying the following code to convert a whole folder rather than a single image.
# Local variables:
SP0013_tif = "SP0013.tif"
SP0013_LayerToKML_kmz = "C:\\Users\\anthonyv\\Documents\\ArcGIS\\SP0013_LayerToKML.kmz"
# Process: Layer To KML
arcpy.LayerToKML_conversion(SP0013_tif, SP0013_LayerToKML_kmz, "0", "NO_COMPOSITE", "DEFAULT", "15000", "5000", "CLAMPED_TO_GROUND")
Solved! Go to Solution.
See the 2nd code snippet in the help topic
Layer To KML—Conversion toolbox | ArcGIS Desktop
Identify the workspace (aka, folder) to the *.lyrx or *.lyr files
arcpy.env.workspace = "C:/data"
Maybe this could help you:
See the 2nd code snippet in the help topic
Layer To KML—Conversion toolbox | ArcGIS Desktop
Identify the workspace (aka, folder) to the *.lyrx or *.lyr files
arcpy.env.workspace = "C:/data"