-
Hi folks. I'm generating a pmtiles with highways for my city, but I don't see any. Tilemaker output is:
I'm looking at "Generated lines: 0" message. How can it be? The source is a 2 MB pbf, I open it in JOSM and see all the roads. Running it like this: docker run -it --rm --pull always -v $(pwd):/data \
ghcr.io/systemed/tilemaker:master \
--verbose \
/data/kiirus.osm.pbf \
--output /data/kiirus.pmtiles \
--config /data/config-kiirus.json \
--process /data/process-kiirus.lua My config: {
"layers": {
"transportation": { "minzoom": 8, "maxzoom": 14, "simplify_below": 13, "simplify_level": 0.0003, "simplify_ratio": 2.0 },
"transportation_name": { "minzoom": 10, "maxzoom": 14 }
},
"settings": {
"minzoom": 8,
"maxzoom": 14,
"basezoom": 14,
"include_ids": false,
"name": "Kiirusepiirangud",
"version": "0.1",
"description": "Speed limit tiles",
"bounding_box": [24.39168153552042, 59.23603991760673, 24.985629899778232, 59.531880901429716],
"compress": "gzip"
}
} And processing script: function way_function()
local highway = Find("highway")
-- Roads
if highway~="" then
Layer("transportation", false)
if highway=="unclassified" or highway=="residential" then highway="minor" end
Attribute("class", highway)
Attribute("maxspeed", Find("maxspeed"))
-- ...and road names
local name = Find("name")
if name~="" then
Layer("transportation_name", false)
Attribute("class", highway)
Attribute("name", name)
end
end
end Sorry if this is a dumb question, I have spent like an hour debugging and googling, and now out of ideas. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Can you upload your .pbf somewhere? |
Beta Was this translation helpful? Give feedback.
-
Hm. If I run that with the default tilemaker profile it happily produces tiles:
That suggests the .pbf is ok, so it's either an issue with the config/Lua, or with whatever you're using to view it. I can't instantly see a problem with the config/Lua though I haven't yet tried them. I usually suggest using vt2geojson to debug vector tiles - spin up your server, then run (say) |
Beta Was this translation helpful? Give feedback.
-
Just tried it with the Lua and config and it works fine. So I think it's most probably an issue with whatever you're using to serve it. Maybe try outputting to .mbtiles rather than .pmtiles, and testing with the bundled server:
|
Beta Was this translation helpful? Give feedback.
-
(The other tool you can use to quickly debug an .mbtiles is QGIS - just drag it into your project and it should appear as a new layer) |
Beta Was this translation helpful? Give feedback.
-
Okay this was indeed my fault — I only checked the tiles in MapLibre, but it seems the browser has cached something. I've checked the tiles in QGIS, and saw all the data. Sorry Richard, and thank you :) |
Beta Was this translation helpful? Give feedback.
Hm. If I run that with the default tilemaker profile it happily produces tiles:
That suggests the .pbf is ok, so it's either an issue with the config/Lua, or with whatever you're using to view it. I can't instantly see a problem with the config/Lua though I haven't yet tried them.
I usually suggest using vt2geojson to debug vector tiles - spin up your server, then run (say)
vt2geojson http://localhost:8080/13/4658/2405.pbf
(or wherever you're hosting the tiles). This should spit out a load of GeoJSON to stdout with your vector tile contents.