I am trying to a convert kml file to a layer using python. This is my code:

import arcpy 
arcpy.KMLToLayer_conversion('C:\kml\\result.kml', 'C:\kml', 'result')

But the layer has lost a lot of objects as compared to the layer converted by Conversion tools -> kmltolayer

I attach 2 screenshots:

layer, which was converted by Convertion tools -> kmltolayer

layer, which was converted by python script

What could be the problem?

  • 2
    does the KML file meet these requirements "Point locations that use the address tag (by way of geocoding) are not supported. A valid latitude and longitude location is required inside the source KML." taken from ArcGIS help site. – landocalrissian Aug 25 '14 at 18:10
  • Would you be able to include a screenshot of the KML To Layer tool dialog so that we can be sure that the same parameters have been used to create both screenshots (which are presumably of the output layer added to ArcMap), please? – PolyGeo Aug 27 '14 at 7:52
  • This is a possible duplicate gis.stackexchange.com/questions/112489/… - are you using ArcGIS Desktop 10.0 too? – PolyGeo Sep 7 '14 at 3:42

Your Answer

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

Browse other questions tagged or ask your own question.