Hello, have successfully created vector mbtiles with tilemaker. How can I now integrate navigation marks from OpenSeaMap. Got seamark planet.osm and converted to .pbf. How do config.json and process.lua write for this case? asked 13 Jun '21, 23:17 wkmhv |
Add some Lua code to look for the tags you're expecting. For example, you could add this within
Use code like this in Then make sure the layers you're writing to are in the json layer config, e.g.:
That's all you need - this will write the data to the vector tiles. Of course, this doesn't magically make the data render on-screen - that bit's outside the scope of tilemaker and is up to you. Use a style editor like Maputnik to choose the icons, colours etc. for the new data you've added to your vector tiles. answered 15 Jun '21, 08:35 Richard ♦ |
why it founds only the first seamark ("man_made") with name "clock" <node id="430222786" lat="54.1491789" lon="-4.4759688" version="6" timestamp="2016-05-20T20:49:47Z" changeset="0"> <tag k="name" v="Jubilee Clock"/> <tag k="amenity" v="clock"/> <tag k="display" v="analogue"/> <tag k="historic" v="monument"/> <tag k="man_made" v="clock"/> </node> function node_function(node)
end kmhv@ubuntu:~/tilemaker-master$ tilemaker --input isle-of-man-latest.osm.pbf --output server/isle-of-man1.mbtiles --config config.json --process process.lua
mbtiles file exists, will overwrite (Ctrl-C to abort, rerun with --merge to keep)
Bounding box -5.43455, -3.68872, 53.7324, 54.6706
Layer waterway (z11-14)
Layer transportation (z8-14)
Layer building (z14-14)
Layer poi (z13-14)
Layer seamarks (z11-14)
Resizing osm store to size: 64M answered 15 Jun '21, 22:20 wkmhv You need to work out which keys & tags to parse (i.e., you can't just work from Richard's example). For instance most of the Isle of Man semarks seem to use "seamark:type" not seamark_type. See https://overpass-turbo.eu/s/18qj
(16 Jun '21, 13:37)
SK53 ♦
This work's node_keys = {"seamark:type"} function node_function(node)
end
(16 Jun '21, 18:02)
wkmhv
|