Natural Earth came out with a newly updated version recently and the group I’m working with decided to be one of the first to use it in a comprehensive vector tile map. There is a “quickstart” style implemented in QGIS and ArcMap but we wanted one implemented in Mapbox GL JS.
Check out the new Tegola Implementation of the Natural Earth Version 4 Quickstart here.
We’re using the minzoom feature of the new data in the Tegola set-up so that only features that have minzooms less than the current user’s zoom level show up. It’s such an easy way to filter data it’s almost not even fair.
The various files used in this implementation include the script to download the Natural Earth data into a PostGIS database, the configuration file that Tegola uses to configure that data, the style file that styles that data in Mapbox GL JS code, and of course the Tegola software itself (use the non “cgo” version for a PostGIS database, use the “cgo” version for geopackage data.)
I put together a quick visual guide on how Tegola can be used for those who maybe want to just see what it is all about without going through the process.
There is some great, official, Tegola getting-started documentation to explore as well. And Eric Theise put together a Hello Tegola blog post that goes much more in depth.
See Nathaniel Kelso’s Natural Earth repo for more information on the data and to see the styling implemented in QGIS and ArcMap (the styling such as colors, line-widths and which datasets to show and how are all translated from those original Kelso styles.)
Making an interactive map of the world using the Natural Earth Quickstart style with the Tegola vector tile server. https://t.co/a7Y90V7dus pic.twitter.com/CdOxbee0hL
— Gretchen Peterson (@PetersonGIS) April 6, 2018
Thanks for the writeup! I was just on the lookout for an easy way of getting postgis to vectortiles, didn't know about Tegola.
— Johnnie (@iamlukesky) April 6, 2018
I like the location you chose for this image
— Juan Marin Otero (@jmarinotero) April 6, 2018
Wow this is really relevant. Can it run totally local??
— Stephen R Smith (@TheMapSmith) April 6, 2018
You mean no internet connection? Then Yes. You may need to fiddle around some cross origin requests but I suppose using something like wamp should solve it. Postgis+Tegola+mapboxGLJS
— Antonio Locandro (@antoniolocandro) April 7, 2018
Recent Comments