0

I need XYZ tiles with only country names to use in a Leaflet website. Do publicly available XYZ tiles with only country names exist? If so, where can one find such resources?

If not, is there such a way to generate XYZ tiles only with country names, controlling sizes and etc for the zoom level?

I would like to have something similar to Stamen Terrain Labels, but they contain city, continents and other information that are not country names.

Stamen Tiles are open source via Github, is it possible to get it into QGIS 3 or a similar visual software, in order to modify it to remove city names and just keep countries? If so, how?

0

From what I gather in your post, you specifically would like to create XYZ tiles with country name labels only. There are a few tools you could use to do this:

Data

I would recommend using Natural Earth for your countries data source if you don't have one already. In particular you may be interested in Admin 0 - Countries or Admin 0 - Details. You can download these for a variety of scales, but since you only need this data for labels, I imagine the 1:110m Cultural Vectors will be sufficient.

Tile Rendering

TileMill

This is an older piece of software, but is well-suited for styling and generating custom raster tiles from a gdal/ogr supported data sources. It uses the CartoCSS language for styling and labeling. Once you're pleased with your style, you can export the results to MBTiles. TileMill runs best on Linux or macOS.

QGIS 3

You can author a map in QGIS 3 and export the results to tiles using the Generate XYZ tiles (Directory) tool in the Processing Toolbox. If you're more comfortable setting up styling and labeling using a graphical user interface (GUI), then this may be a nicer environment in which to create your label tiles.

|improve this answer|||||
  • Thank you. I edited the question for more clarity. Is it possible to modify Stamen's files in order to just edit the tiles on QGIS 3 for example instead of starting from scratch? – steps Nov 22 '19 at 20:13
  • Since the tiles are just PNG/JPEG images, you can't efficiently add features to or remove them from the tiles without re-rendering them from source. The labels and features are baked into the tiles. However, you could use something like Mapbox Studio, fork one of their styles, and edit it to only show country labels. The tiles produced from Mapbox Studio are vector tiles and allow much more flexibility for quickly changing map styles. – maptastik Nov 25 '19 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.