My Google Map Blog

Archive for February 25th, 2016

Classifying placemarks by region

by Timothy Whitehead on Feb.25, 2016, under 3D Models, Argentina, Australia, Brazil, California, Denmark, England, Germany, Google Earth News, Google Earth Tips, Google Sky, Google maps, Hawaii, Indonesia, Ireland, Italy, Japan, Kenya, Mexico, Natural Landmarks, Netherlands, Sightseeing, Street Views, USA

As we mentioned in yesterday’s post we have been working on a bit of code to determine whether or not a placemark lies inside a polygon. We believe we have got it working and thought it might be useful for people who want to classify placemarks by region. So, we have created the JavaScript-based tool below.

To use it, simply upload a set of placemarks and polygons and it will check what polygons the placemarks are in and put them all in folders named after the polygons and give you back a KML file with all the placemarks nicely categorised. As an example, we found this map of nuclear power plants on the Google Maps Gallery. We opened it in Google Earth to get the KML version, then used both it and the country borders we showed you yesterday to classify all the nuclear power stations by country.

It accepts multiple files so you can have your placemarks in one file and regions in another. It can be quite slow for large datasets. The above datasets took about 3 minutes on a fast computer.
[ Update: We have fixed a few bugs and added some optimizations which has improved the performance significantly.]

Include empty regions

As usual we have not yet tested it thoroughly and make no guarantees that it will work perfectly. The country outlines are not very high resolution so placemarks near borders may be incorrectly classified. Let us know about any bugs you find or enhancements you would like to see, in the comments below.


Once the placemarks are classified it is easy to select only one folder.

We were also able to use it to make an approximate list of the number of nuclear power stations per country. Note that the list includes both active and inactive power stations and lists individual reactors not sites. For example Pickering in Canada has 8 reactors. We also do not know how old the list is.

The biggest problem is that nuclear reactors are often near coastlines and as mentioned above, the country outlines are not very high resolution and many of the nuclear reactors are outside the country borders. So, of the 766 reactors in the original file, only 578 were successfully classified.

Country # of reactors
Armenia 2
Argentina 5
Australia 1
Bulgaria 5
Canada 24
China 22
Cuba 1
Czech Republic 9
Finland 2
France 71
Germany 32
Hungary 5
India 22
Iran (Islamic Republic of) 3
Israel 1
Italy 3
Iraq 1
Japan 45
Korea, Republic of 8
Lithuania 1
Slovakia 6
Mexico 1
Belgium 9
Netherlands 1
Romania 3
Russia 60
Slovenia 2
Spain 16
Sweden 9
Switzerland 11
Ukraine 22
United States 168
Taiwan 7

The post Classifying placemarks by region appeared first on Google Earth Blog.

Comments Off :, more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...