Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Nodes will only be processed if one of these keys is present
- node_keys = { "amenity", "shop" }
- -- Initialize Lua logic
- function init_function()
- end
- -- Finalize Lua logic()
- function exit_function()
- end
- -- Assign nodes to a layer, and set attributes, based on OSM tags
- function node_function(node)
- -- local amenity = node:Find("amenity")
- -- local shop = node:Find("shop")
- -- if amenity~="" or shop~="" then
- -- node:Layer("pois", false)
- -- if amenity~="" then node:Attribute("type",amenity)
- -- else node:Attribute("type",shop) end
- -- node:Attribute("name", node:Find("name"))
- -- end
- end
- -- Similarly for ways
- function way_function(way)
- local area_highway = way:Find("area:highway")
- if area_highway~="" then
- way:Layer("area_highway", true)
- way:Attribute("surface", way:Find("surface"))
- way:Attribute("type",area_highway)
- -- way:Attribute("id",way:Id())
- -- way:AttributeNumeric("area",37)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement