0

I'm writing a script in python that loops the LayerToKML conversion tool on a set of layers; the problem is that the first execution works fine, while the rest (hundreds) produce .kmz files like this...

enter image description here

...all the geometries are invisible and placed at the Equator or North Pole, while the attributes are correct.

I run the script with an IDE (PyScripter, 32 Bit, python 2.7.2): if I do it with the ArcGIS (10.1) python window, it works instead!

PS: athis is the code function that I use to convert the shapefiles:

def creatingKmz(fcKmz,fcName):

    arcpy.MakeFeatureLayer_management(fcKmz, fcName)
    arcpy.ApplySymbologyFromLayer_management(fcName,inFolder + os.sep + fc + ".lyr")
    arcpy.LayerToKML_conversion(fcName,outKMZDirectory + os.sep + fcName + ".kmz","1","false",arcpy.Describe(fcName).extent,"","","CLAMPED_TO_GROUND")
    arcpy.Delete_management(fcKmz)
  • 1
    do you mind posting your code? – ZrSiO4 Apr 13 '18 at 16:09
  • Hy ZrSiO4, I've just added to the post the conversion function, thanks for the reply. – Davide Pavia Apr 16 '18 at 10:11
1

Hy everyone, we've solved the problem by changing the system decimal separator, from comma to point. Thanks for the attention and have a good day.

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.