[GIS] Why is the KML file too large

google mapskml

I'm attempting to upload a KML file to Google My Maps. But it says that the file I'm attempting to upload is either non-parse-able, or too large.

Google Maps Error

The KML file in question is generated by a program I've written. I've tried removing all of the polygons save three and the KML parses and uploads correctly. So I'm fairly sure it's not an error in my KML syntax. I've also validated it in

Here is the output from my program:

POLYGONS WRITTEN: 53
TOTAL POINTS WRITTEN: 4418
SELECTED OUTPUT FILE: output.kml

I run:

[foo@localhost test]$ ls -lh

-rw-rw-r–. 1 foo foo 108K Apr 22 16:48 output.kml

and can see that the file size of output.kml is 108 Kilobytes.

According to Google, the max file size is 10MB. So I'm well within the limit – memory-wise.

I don't understand why my file is being rejected. When I remove the majority of the polygons, the file is accepted. So the syntax is fine. But I seem to be within the file size limitations.

What's going on here? And how do I get around it?

Best Answer

I ran my KML through an XML validator, and it brought to my attention an extra closing tag somewhere. I fixed my program and now it uploads. Basically, the answer was: My program was broken. My apologies. Thank you all for your help.

Related Question