Skip to content

Commit eb53204

Browse files
committed
Modernize data-types.lua example config
* Use insert()
1 parent ead1020 commit eb53204

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

flex-config/data-types.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function osm2pgsql.process_way(object)
102102
-- We want to put the name in its own column
103103
local name = object:grab_tag('name')
104104

105-
highways:add_row({
105+
highways:insert({
106106
name = name,
107107
type = highway_type,
108108

@@ -122,7 +122,8 @@ function osm2pgsql.process_way(object)
122122
-- for a column of type "int8[]".
123123
nodes = '{' .. table.concat(object.nodes, ',') .. '}',
124124

125-
tags = object.tags
125+
tags = object.tags,
126+
geom = object:as_linestring()
126127
})
127128
end
128129

0 commit comments

Comments
 (0)