mirror of
https://github.com/osm2pgsql-dev/osm2pgsql.git
synced 2025-08-16 15:04:27 +00:00
Modernize with-schema.lua example config
* Use insert()
This commit is contained in:
@ -8,13 +8,13 @@
|
||||
|
||||
local dtable = osm2pgsql.define_way_table('data', {
|
||||
{ column = 'tags', type = 'jsonb' },
|
||||
{ column = 'geom', type = 'geometry' },
|
||||
{ column = 'geom', type = 'linestring' },
|
||||
}, { schema = 'myschema' })
|
||||
|
||||
function osm2pgsql.process_way(object)
|
||||
dtable:add_row({
|
||||
dtable:insert({
|
||||
tags = object.tags,
|
||||
geom = { create = 'line' }
|
||||
geom = object:as_linestring()
|
||||
})
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user