-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
If you write two slices:
node_keys = {"amenity"}
function node_function()
Layer("amenity")
endand
node_keys = {"tourism"}
function node_function()
Layer("tourism")
endand do mapt build, you will get two layers who each contain only amenity or tourism nodes.
If you do mapt build --single, you will get two layers who contain all nodes. This is because the merged driver file does not attempt to express your node_keys (or way_keys) to tilemaker, or filter on them before calling you.
So users need to write their functions defensively, e.g.:
node_keys = {"amenity"}
function node_function()
if Find("amenity") == "" then return end
Layer("amenity")
endThis is OK for a v1, but it'd be nicer if:
- the driver enforced node_keys/way_keys before delegating to your function
- the driver (when possible) expressed node_keys/way_keys to tilemaker, to allow it to optimize reading
- it's not generally possible to do this for all permutations, but if your keys were all positive (i.e. no
~buildingentries), we could just union them all together
- it's not generally possible to do this for all permutations, but if your keys were all positive (i.e. no
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels