# Import system modules import arcpy from arcpy import env # Obtain a license for the 3D Analyst extension arcpy.CheckOutExtension("3D") # Set environment settings env.workspace = "H:\\DATA\\GENERAL\\Arcpad Mooring Data - Don't Delete\\HORNSBY REGION\\Hawkesbury River\\Mooring Management" if len(arcpy.ListFiles('*.lyr')) > 0: for layer in arcpy.ListFiles("*.kmz"): arcpy.Delete_management(layer, "LayerFiles") # Strips the '.lyr' part of the name and appends '.kmz' for layer in arcpy.ListFiles("*.lyr"): outKML = layer[:-4] + ".kmz" arcpy.LayerToKML_conversion(layer, outKML, "10000", "false", "Default", "1024", "96") else: print "There are no layer files (*.lyr) in " +env.workspace+ "."
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.