Skip to content

Commit ead1020

Browse files
committed
Modernize with-schema.lua example config
* Use insert()
1 parent 115e748 commit ead1020

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

flex-config/with-schema.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
local dtable = osm2pgsql.define_way_table('data', {
1010
{ column = 'tags', type = 'jsonb' },
11-
{ column = 'geom', type = 'geometry' },
11+
{ column = 'geom', type = 'linestring' },
1212
}, { schema = 'myschema' })
1313

1414
function osm2pgsql.process_way(object)
15-
dtable:add_row({
15+
dtable:insert({
1616
tags = object.tags,
17-
geom = { create = 'line' }
17+
geom = object:as_linestring()
1818
})
1919
end
2020

0 commit comments

Comments
 (0)