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.
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.
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.)
— 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