[Tile-serving] [openstreetmap/osm2pgsql] Make it easier to reproduce --hstore behavior with flex backend (#1123)

Paul Norman notifications at github.com
Sun Apr 26 00:28:27 UTC 2020


I've been doing some testing, and the best I've come up with is

```lua
local point_columns = {
    'access', ... }

local point_columns_map = {}
for _, key in ipairs(point_columns) do
    point_columns_map[key] = true
end

function osm2pgsql.process_node(object)
    if clean_tags(object.tags) then
        return
    end
    cols['layer'] = layer(object.tags['layer'])
    object.tags['layer'] = nil
    for key, value in pairs(object.tags) do
        if point_columns_map[key] then
            cols[key] = value
            object.tags[key] = nil
        end
    end
    ...
end
```
Iterating over point_columns  is not an option because it is too long and this slows way processing down by about 25%.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1123#issuecomment-619459475
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200425/3ebe5395/attachment.htm>


More information about the Tile-serving mailing list