I try to convert with arcpy (python 2.7.8) 50 KML and KMZ files, that i downloaded from google earth into shapefiles. All files located in many sub-Folders. All Sub Folders are located in one large directory. When i run this code:
import arcpy,fnmatch,osrootPath = r"C:\Project\gis\layers"pattern = '*.km*'for root, dirs, files in os.walk(rootPath): for filename in fnmatch.filter(files, pattern): print(os.path.join(root, filename)) arcpy.KMLToLayer_conversion( r"C:\Project\gis\layers" ,r'C:\Project\gis') i get an error:
C:\Project\gis\layers\ESD.kmlExecuteError: Failed to execute. Parameters are not valid.ERROR 000814: Invalid file typeFailed to execute (KMLToLayer).I red:
Python Script to convert a mass of KMLs to a single fGDB
http://resources.arcgis.com/en/help/main/10.2/index.html#/KML_To_Layer/00120000004w000000/ but didn't understand my code mistake
أكثر...
import arcpy,fnmatch,osrootPath = r"C:\Project\gis\layers"pattern = '*.km*'for root, dirs, files in os.walk(rootPath): for filename in fnmatch.filter(files, pattern): print(os.path.join(root, filename)) arcpy.KMLToLayer_conversion( r"C:\Project\gis\layers" ,r'C:\Project\gis') i get an error:
C:\Project\gis\layers\ESD.kmlExecuteError: Failed to execute. Parameters are not valid.ERROR 000814: Invalid file typeFailed to execute (KMLToLayer).I red:
Python Script to convert a mass of KMLs to a single fGDB
http://resources.arcgis.com/en/help/main/10.2/index.html#/KML_To_Layer/00120000004w000000/ but didn't understand my code mistake
أكثر...