Convert multi KML and KMZ into shapefile using ArcPy?

4280
2
07-28-2015 12:23 AM
Yaron_YosefCohen
Occasional Contributor II

Hi everyone,

For clarity, i asked this question in python - Convert multi KML and KMZ into shapefile using ArcPy? - Geographic Information Systems Stac... .

I don't know how to do it with arcpy?

Thanks in advance.

0 Kudos
2 Replies
DanPatterson_Retired
MVP Esteemed Contributor

As Polygeo says, you have to add your filename variable to the folder since the first parameter is the kml filename, then the output folder...then optionally the output name NOT INCLUDING the folder name...and you can skip the last one.

KMLToLayer_conversion (in_kml_file, output_folder, {output_data}, {include_groundoverlay})

ParameterExplanationData Type

in_kml_file

The KML or KMZ file to translate.

File

output_folder

The destination folder for the file geodatabase and layer (.lyr) file.

Folder

output_data

(Optional)

The name of the output file geodatabase and layer file (.lyr). Defaults to the name of the input KML file.

String

include_groundoverlay

(Optional)

Include ground overlay (raster, air photos, and so on). Use caution if the KMZ points to a service that serves raster imagery. The tool will attempt to translate the raster imagery at all available scales. This process could be lengthy and possibly overwhelm the service.

    <esri_enumhead><esri_enumvaluehd><esri_enumdeschd>
  • GROUNDOVERLAYGround overlays are included in the output.
  • NO_GROUNDOVERLAYGround overlays are not included in the output.  This is the default.
Boolean
0 Kudos
Salehalamri
New Contributor II

How we can write the code to help us to write script to convert multi format to another format

0 Kudos