AnsweredAssumed Answered

Layer to KML faulty output

Question asked by joanvm on Feb 18, 2013
Latest reply on Apr 17, 2015 by AJT_Terrassa

The image above should be a polyline layer arround Barcelona area, clearly it isn't. I continuously get output errors like this one when using the "layer to KML" toolbox provided in ArcGis:
  - All features are drawn at the equator
  - Some features drawn at the equator, some precisely placed
  - The above weird polyline layer

I'm sure this must be a toolbox error, since I get the right output rerunning the tool as many times as needed till I get all the KMZs correctly generated. I.E, if I apply the tool to 16 layers, it might correctly generate less than 6, and then I rerun it for the other 10 layers, which will correctly generate less than 5 layers, and on and on till I have all the KMZ.

I've been researching about this bug but apparently it isn't reported.

Anyone have experienced this weird behavior?


I've been digging around inside the kmz files and found something as curious as non understandable.
Apparently those polylines which are properly displayed use the '.' as decimal separator while the faulty ones use the ',' and here is where everything is messed up since ',' is also used as coordinate separator in KML.

Another bit about this, when the tool is executed from the ArcMap with loaded layers, everything runs flawlessly, which makes sense since I guess it uses the coordinates used by ArcMap to draw the features, so the problem seems to affect solely when the tool is executed from a ModelBuilder so the SHP files aren't loaded as layers in the ArcMap but in the ModelBuilder.

Attached you'll a txt with four features (2 good ones and 2 flawed ones) where I've identified this difference in the decimal separator.