8

I am looking to convert a folder with multiple shapefiles (over 100) to KML/KMZ files. I am sure I can build a model in ArcGIS to do this conversion but I am unsure on the iteration I should use.

I just need the KML files to have the same name and attributes as the shapefile. Style does not matter

  • 1
    Do the shapefiles need to have a style applied? for the KML generation – Mapperz Sep 28 '15 at 18:35
  • I just need the KML files to have the same name and attributes as the shapefile. Style does not matter – GIS Pat Sep 28 '15 at 18:37
  • If you have a license for Global Mapper, I think it will do this- better and more straightforward than ArcGIS. – user60028 Sep 30 '15 at 14:28
9

Use the "Iterate Feature Class" tool and set up your model to look similar to this:

enter image description here

To get the name of the output KMZ to match the name of the input shapefile, you will need to make some changes to your "Layer to KML" tool.

Set it up to look like this, using %Name% as the name of your desired output KML in the Output File line:

enter image description here

Setting the name like this is called inline variable substitution. For more information, take a look at this article.

1

Use this simple combination:

  1. Iterate Feature Classes (set the Workspace to the folder of shapefiles)

  2. Use MakeFeatureLayer tool to create a layer from the shape file (Thanks to KHibma)

  3. Use "Layer To KML" tool

  • That is what I tried but it wont let me link the iteration to the Layer to KML tool. In the layer selection drop down my iteration output is not there – GIS Pat Sep 28 '15 at 18:47
  • You'll need to use MakeFeatureLayer between the 2 processes. Layer to KML expects a layer, not a featureclass (which is what the iterator is spiting out) – KHibma Sep 28 '15 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.