Wednesday, July 17, 2019

Creating & Editing GeoJSON Data


I have a new favorite mapping tool. When I'm creating an interactive map I usually spend way too much of my time searching for or creating GeoJSON files. When I need country polygons I often use Natural Earth, which is a great resource of free vector and raster map data. However when I download country polygons from Natural Earth I often spend a lot of time optimizing the size of the GeoJSON data I need by manually removing the data for countries that I don't need for the map I am currently working on.

This is where GeoJSON Maps of the Globe will now save me lots of time. GeoJSON Maps of the Globe allows you to easily build your own country polygon GeoJSON data by simply selecting countries on an interactive map. For example, if you just want to create a map of EU countries you could use GeoJSON Maps of the Globe to build a GeoJSON file with only the county polygon data for the 28 European countries that you need. The resulting GeoJSON file will therefore be a lot smaller in size than a GeoJSON file that includes the polygon data for every country in the world.

The data for GeoJSON Maps of the Globe comes from Natural Earth. If you use Natural Earth Data a lot then you will find GeoJSON Maps of the Globe very useful. Once you have built your map by selecting the required countries on the interactive map you have a choice to download the data in three levels of resolution, depending on how detailed you need your map to be.

I used GeoJSON Maps of the Globe when creating my 'Map' in European Languages map. For this map I only needed the polygons of countries in Europe. I therefore simply clicked on the countries I wanted on GeoJSON Maps of the Globe and downloaded the resulting GeoJSON file. I then imported the GeoJSON data into Mapbox Studio, where I colored the countries depending on whether their word for 'map' is derived from Latin or from Greek.

I actually could have created my 'Map' in European Languages using Leaflet.js. GeoJSON Maps of the Globe includes an option to download all the code needed to create an interactive map using Leaflet.js and your downloaded GeoJSON file.

If you also use GeoJSON data a lot then you might also like another GeoJSON tool, which I use on an almost daily basis for building and refining map data. geojson.io is an online tool for editing and creating GeoJSON map data.

No comments: