This blog post explains how I handle a typical bug report for the new OSMF Shortbread tiles. Here, I focus on the “island” seems to be missing from “place_labels” report from SomeoneElse
After verifying that the report is correct, I set up my editor environment. It’s useful to have an environment that syntax highlights Jinja SQL files, as well as other files. I use a Visual Studio Code-based editor with the Better Jinja plugin.
The issue is in the place_labels
layer. After checking Shortbread, I see that place=island should show at zoom 10 or higher, so there is a bug. Tilekiln creates tiles by reading definitions from shortbread.yaml
, so I check there for the place_labels
definition.
place_labels:
description: Holds label points for populated places.
fields:
kind: Value of OSM place tag
name: *name
name_en: *name_en
name_de: *name_de
population: Value of OSM population tag
sql:
- minzoom: 4
maxzoom: 14
file: shortbread_original/place_labels.04-14.sql.jinja2
This file shows that for zooms 4 to 14, the SQL for the layer is in shortbread_original/place_labels.04-14.sql.jinja2.
Since this file is in shortbread_original
, osm2pgsql-themepark created it, and it remains unchanged.
SELECT
ST_AsMVTGeom(geom, {{unbuffered_bbox}}, {{extent}}, {{buffer}}) AS way,
name,
name_de,
name_en,
kind,
population
FROM place_labels
WHERE geom && {{bbox}}
AND {{zoom}} >= minzoom
ORDER BY population desc
There aren’t any obvious bugs in the SQL. There’s no filtering out of islands, so either the data isn’t making it into the place_labels table or it has the wrong zoom. The data is loaded by osm2pgsql, and shortbread.lua
tells osm2pgsql how to do that.
themepark:add_topic('shortbread/places')