Need help running 'layer to kml' tool on a directory location with all of my geotiff images

386
2
Jump to solution
08-15-2019 08:35 AM
by Anonymous User
Not applicable

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")
0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

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"

View solution in original post

2 Replies
JohannesBierer
Occasional Contributor III

Maybe this could help you:

Walk—Data Access module | ArcGIS Desktop 

DanPatterson_Retired
MVP Emeritus

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"