Select to view content in your preferred language

Layer to KML wont create a valid kmz

6390
6
Jump to solution
09-01-2021 06:27 AM
Labels (3)
AdrianPatrulescu
Regular Contributor

Hi,

I try to export 'layer to kml' and most the times wont work (it produced an empty KMZ  for example parks.kmz - inside kmz.zip)

But with another layer it produced a valid kmz file (for example pa.kmz - inside kmz.zip)

The both layers have the same spatial references (EPSG 3844), and both are polygons

Does anybody have the same problem?

I have followed this steps for converting to kml: https://www.youtube.com/watch?v=STUxT3yWy3c

But the result it is an empty kmz (in Google earth/ArcGis is not showing any geometry)

Thank you 

Adrian

How to convert an ESRI shapefile to KML in ArcGIS Pro for use in Google Earth. Courtesy of Tessellations Inc., visit us at http://tessellations.us - Meet your GIS Company where quality matters. Do you have GIS questions or video topic requests? Then submit a form at ...
0 Kudos
1 Solution

Accepted Solutions
David_Brooks
MVP Regular Contributor

@AdrianPatrulescu , i projected your data into WGS84 and then exported to KML and it worked fine, yielding 140 features.

However, i also ran the check geometry tool and you appear to have some dodgy polygons too:

FEATURE_IDPROBLEM
12self intersections
72self intersections
125null geometry

 

Running repair geometry fixes the self intersections and deletes the null geometry rows. However, only 139 features remained unlike via the project to WGS84 method, and exporting to KML from your native coordinate system is yielding null geometry in the KML in Google Earth. (oddly, it recognises each feature as a point with no gemoetry but all the attributes).

Ultimately, a geoprocess of projecting to WGS84 will solve it, but maybe check the validity of the data you're using as well.


David
..Maps with no limits..

View solution in original post

6 Replies
David_Brooks
MVP Regular Contributor

@AdrianPatrulescu , did you know that you can drag and drop a shapefile straight into Google Earth Pro? You can then export a KML/KMZ from there, as a workaround. 

If there is an error dropping a shapefile version of your layer into Google Earth, then possibly you have an invalid geometry that isn't support in keyhole markup language.

Also, possibly true/bezier curves in the original layer? Try and "generalize" the layer and re-export?


David
..Maps with no limits..
0 Kudos
AdrianPatrulescu
Regular Contributor

Hi David,

Thank you for your quick response

I didn't know you can drag shp to G.Earth Pro

I will use this workaround although will require extra steps because most of my data are inside GDB and require export to shp and import to G.Earth Pro.

I have tried with one shp - imported to G.Earth Pro and exported to kmz works OK but the same shp I imported to ArcGis Pro then exported to kmz it didn't work - is generated same empty kmz

I have attached this shp

Thank you 

Adrian

 

0 Kudos
David_Brooks
MVP Regular Contributor

@AdrianPatrulescu , i projected your data into WGS84 and then exported to KML and it worked fine, yielding 140 features.

However, i also ran the check geometry tool and you appear to have some dodgy polygons too:

FEATURE_IDPROBLEM
12self intersections
72self intersections
125null geometry

 

Running repair geometry fixes the self intersections and deletes the null geometry rows. However, only 139 features remained unlike via the project to WGS84 method, and exporting to KML from your native coordinate system is yielding null geometry in the KML in Google Earth. (oddly, it recognises each feature as a point with no gemoetry but all the attributes).

Ultimately, a geoprocess of projecting to WGS84 will solve it, but maybe check the validity of the data you're using as well.


David
..Maps with no limits..
AdrianPatrulescu
Regular Contributor

Thank you again David,

If I re-project to 3857 and then export to kml it work OK, also geometry  check is important before re-project.

Best regards

Adrian

RodNielson1
Occasional Contributor

I had a similar issue. I saved my project as Arc 10.7 and Feature to KML worked fine. All of the other things mentioned here I did and go no result, but going back to 10.7.1 worked. 

0 Kudos
by Anonymous User
Not applicable

I'm using Pro 3.1.0. When using the tool on a feature service it works as expected. I exported the shapefile to a stand alone file geodatabase (I needed to make some updated to the geometry that I don't want to save in our SDE database) and then tried to run the tool and I keep getting the generic 999999 error. Any thoughts? I exported it as a shapefile with the same results and tried both of the methods mentioned above (project & repair geometry) without success.

SHartholt_0-1681742624881.png

 

0 Kudos