Files
osm2pgsql/tests/data/test_output_flex_schema.lua
Jochen Topf 3ad48b7f59 Replace add_row() by insert() in some tests
At some point we'll deprecate add_row(), tests that don't explicitly
test add_row() should use insert().
2023-01-23 11:47:33 +01:00

26 lines
514 B
Lua

local dtable = osm2pgsql.define_way_table('osm2pgsql_test_line', {
{ column = 'tags', type = 'hstore' },
{ column = 'geom', type = 'linestring' },
}, { schema = 'myschema' })
local delete_keys = {
'odbl',
'created_by',
'source'
}
local clean_tags = osm2pgsql.make_clean_tags_func(delete_keys)
function osm2pgsql.process_way(object)
if clean_tags(object.tags) then
return
end
dtable:insert({
tags = object.tags,
geom = object:as_linestring()
})
end