mirror of
https://github.com/osm2pgsql-dev/osm2pgsql.git
synced 2026-01-17 13:31:07 +00:00
At some point we'll deprecate add_row(), tests that don't explicitly test add_row() should use insert().
29 lines
649 B
Lua
29 lines
649 B
Lua
|
|
local tables = {}
|
|
|
|
tables.t1 = osm2pgsql.define_node_table('osm2pgsql_test_t1', {
|
|
{ column = 'tags', type = 'hstore' },
|
|
{ column = 'geom', type = 'point' },
|
|
})
|
|
|
|
tables.t2 = osm2pgsql.define_node_table('osm2pgsql_test_t2', {
|
|
{ column = 'tags', type = 'hstore' },
|
|
{ column = 'geom', type = 'point' },
|
|
})
|
|
|
|
function osm2pgsql.process_node(object)
|
|
if object.tags.t1 then
|
|
tables.t1:insert({
|
|
tags = object.tags,
|
|
geom = object:as_point()
|
|
})
|
|
end
|
|
if object.tags.t2 then
|
|
tables.t2:insert({
|
|
tags = object.tags,
|
|
geom = object:as_point()
|
|
})
|
|
end
|
|
end
|
|
|