Select to view content in your preferred language

Convert KML to SHP file Index Error

997
2
12-13-2011 09:24 AM
HeatherPrencipe
Emerging Contributor
I'm using Arc 9.3.1
I'm trying to convert some Google Earth files I made in Google Earth to a shapefile.  I have all the same type (polygons) saved in one folder.  I right click on this and choose save place as, adn give it a name and it is saved as a kml file. 

Now I am trying to use some added toolboxes to convert from KML to SHP (Convert KML to SHP, and Convert GPSFile to SHP) and both are not working for me except for my point files...  I get the following error... does anyone have any insight as to what I can do to fix this, and convert a kml file to shapefile?

Executing: kml2shp "C:\MESL Projects\MESL SOP\zz_TO DELETE\Heather's Scratch\HeatherPolygons.kml" POLYGON "C:\MESL Projects\MESL SOP\zz_TO DELETE\Heather's Scratch\HeatherPolygons_kml2shp.shp"
Start Time: Tue Dec 13 11:14:28 2011
Running script kml2shp...
Retrieving POLYGON data from KML file...
  File "<string>", line 214, in <module>

<type 'exceptions.IndexError'>: list index out of range
Completed script kml2shp...
Failed to execute (kml2shp).
End Time: Tue Dec 13 11:14:28 2011 (Elapsed Time: 0.00 seconds)


I hope to hear from you thanks!
0 Kudos
2 Replies
HeatherPrencipe
Emerging Contributor
I also sometimes get this error..


<type 'exceptions.ValueError'>: empty string for float()


it seems like it may be a problem with the kml I've saved?
0 Kudos
HeatherPrencipe
Emerging Contributor
I just found the answer, it was the version of Google Earth ( too new ) that was causing the problem.  This is the updated code http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=F2747C53-1422-2418-34BF-037B5... , also found and explained in the bottom of this forum thread.

http://forums.arcgis.com/threads/12628-KML-to-SHP-Error-using-latest-Google-Earth

Worked like a charm.
0 Kudos