Skip to content

Commit ab8fa1d

Browse files
authored
Merge pull request #1471 from joto/generic-flex-tags-type
Slight improvement of generic.lua config
2 parents bb9d951 + e6cd655 commit ab8fa1d

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)