[GIS] How to know the numbers of placemarks in a kml file without counting

google earthkml

I have multiple kml files, each containing hundreds of placemarks. I suspect that I accidentally deleted a few placemarks. Since there are too many placemarks, it's not possible form me to count them altogether. So, is there any way to know the number of placemarks in a kml file?

Best Answer

Try using Notepad++, a powerful text editor. I use it for a lot of my KML editing, and it has some powerful find/replace tools. These include a "count" function that will let you count the instances of a certain string (eg: "<Placemark"). The Find dialog also includes a "Find in Files" tab, which will allow you to find a string across all files in a directory. While that doesn't have a "count" button, its output includes a count of the total number of instances across all files.

Notepad++ is Windows only, so if you're on another platform you can find similar functionality in something like jEdit, or another advanced text editor.