Layer to KML wont create a valid kmz

821
5
Jump to solution
09-01-2021 06:27 AM
Labels (3)
AdrianPatrulescu
New Contributor III

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

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

5 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
New Contributor III

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
New Contributor III

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
New Contributor II

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