So when I create line dot ect. after converting layer to KML file contains "MultiGeometry" tag. How could I get KML file without it?

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.opengis.net/kml/2.2 http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd http://www.google.com/kml/ext/2.2 http://code.google.com/apis/kml/schema/kml22gx.xsd">
<Document id="Untitled_map">
  <name>Untitled map</name>
  <Style id="PolyStyle00">
  <Folder id="FeatureLayer0">
    <name>Untitled layer</name>
    <Placemark id="ID_00000">
          <extrude>0</extrude>          <altitudeMode>clampToGround</altitudeMode>
          <outerBoundaryIs><LinearRing><coordinates> SOME COORDINATES </coordinates></LinearRing></outerBoundaryIs>

This is one of numerous annoyances in the way that ArcGIS generates KML files. In theory it should only include a MultiGeometry when there are multiple geometry features in one Placemark, and not when there is only one feature. Unfortunately I don't know of any way to turn that off when generating the KML in ArcGIS.

So long as you are very certain that every MultiGeometry in your file only contains one actual Geometry, then you can just remove all the MultiGeometry tags. For a one-off file, I would do it by bringing the KML into a text editor, and using a simple find/replace to remove the opening and closing MultiGeometry tags. You could also do it with a script of your choosing that parses through the file and removes MultiGeometry tags.

  • Thanks for answer. Removing by hand is not an option. Script is a good way to go but is still additional step you must do. Maybe there is somewhere xsl file that could be changed or in arcpy.LayerToKML_conversion, but with my basic python knowledge is a bit complicated to backtrack it .
    – Sergej
    Apr 12 at 20:44
  • 1
    so basically i just found script/ tool that converts kml kmz fle in kml but creates central point in polygons. link : arcgis.com/home/item.html?id=e8e62bf409ae4bc997632c654382de04
    – Sergej
    Apr 13 at 7:06

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.