Skip to content

Commit e6cd655

Browse files
committed
Slight improvement of generic.lua config
We "split" up the relations based on the type onto different tables here and there is no case where the type tag will be useful in the database and everything without type is dropped anyway. Fixes #1441
1 parent db36f4c commit e6cd655

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flex-config/generic.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,12 @@ function osm2pgsql.process_way(object)
248248
end
249249

250250
function osm2pgsql.process_relation(object)
251+
local type = object:grab_tag('type')
252+
251253
if clean_tags(object.tags) then
252254
return
253255
end
254256

255-
local type = object.tags.type
256-
257257
if type == 'route' then
258258
tables.routes:add_row({
259259
tags = object.tags,
@@ -270,7 +270,7 @@ function osm2pgsql.process_relation(object)
270270
return
271271
end
272272

273-
if object.tags.type == 'multipolygon' then
273+
if type == 'multipolygon' then
274274
tables.polygons:add_row({
275275
tags = object.tags,
276276
geom = { create = 'area' }

0 commit comments

Comments
 (0)