Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions flex-config/style/amenity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ tables.amenity_point = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'node', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'housenumber', type = 'text'},
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'state', type = 'text'},
{ column = 'postcode', type = 'text'},
{ column = 'address', type = 'text', not_null = true},
{ column = 'wheelchair', type = 'text'},
{ column = 'wheelchair_desc', type = 'text'},
{ column = 'geom', type = 'point' , projection = srid},
{ column = 'geom', type = 'point', projection = srid, not_null = true},
}
})

Expand All @@ -27,18 +27,18 @@ tables.amenity_line = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'way', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'housenumber', type = 'text'},
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'state', type = 'text'},
{ column = 'postcode', type = 'text'},
{ column = 'address', type = 'text', not_null = true},
{ column = 'wheelchair', type = 'text'},
{ column = 'wheelchair_desc', type = 'text'},
{ column = 'geom', type = 'linestring' , projection = srid},
{ column = 'geom', type = 'linestring', projection = srid, not_null = true},
}
})

Expand All @@ -48,18 +48,18 @@ tables.amenity_polygon = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'area', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'osm_subtype', type = 'text' },
{ column = 'name', type = 'text' },
{ column = 'housenumber', type = 'text'},
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'state', type = 'text'},
{ column = 'postcode', type = 'text'},
{ column = 'address', type = 'text', not_null = true},
{ column = 'wheelchair', type = 'text'},
{ column = 'wheelchair_desc', type = 'text'},
{ column = 'geom', type = 'multipolygon' , projection = srid},
{ column = 'geom', type = 'multipolygon', projection = srid, not_null = true},
}
})

Expand Down Expand Up @@ -124,7 +124,7 @@ function amenity_process_node(object)
local wheelchair = object.tags.wheelchair
local wheelchair_desc = get_wheelchair_desc(object.tags)

tables.amenity_point:add_row({
tables.amenity_point:insert({
osm_type = osm_types['osm_type'],
osm_subtype = osm_types['osm_subtype'],
name = name,
Expand All @@ -136,7 +136,7 @@ function amenity_process_node(object)
address = address,
wheelchair = wheelchair,
wheelchair_desc = wheelchair_desc,
geom = { create = 'point' }
geom = object:as_point()
})

end
Expand Down Expand Up @@ -165,7 +165,7 @@ function amenity_process_way(object)
local wheelchair_desc = get_wheelchair_desc(object.tags)

if object.is_closed then
tables.amenity_polygon:add_row({
tables.amenity_polygon:insert({
osm_type = osm_types['osm_type'],
osm_subtype = osm_types['osm_subtype'],
name = name,
Expand All @@ -177,10 +177,10 @@ function amenity_process_way(object)
address = address,
wheelchair = wheelchair,
wheelchair_desc = wheelchair_desc,
geom = { create = 'area' }
geom = object:as_polygon()
})
else
tables.amenity_line:add_row({
tables.amenity_line:insert({
osm_type = osm_types['osm_type'],
osm_subtype = osm_types['osm_subtype'],
name = name,
Expand All @@ -192,7 +192,7 @@ function amenity_process_way(object)
address = address,
wheelchair = wheelchair,
wheelchair_desc = wheelchair_desc,
geom = { create = 'line' }
geom = object:as_linestring()
})
end

Expand All @@ -215,7 +215,7 @@ function amenity_process_relation(object)
local wheelchair = object.tags.wheelchair
local wheelchair_desc = get_wheelchair_desc(object.tags)

tables.amenity_polygon:add_row({
tables.amenity_polygon:insert({
osm_type = osm_types['osm_type'],
osm_subtype = osm_types['osm_subtype'],
name = name,
Expand All @@ -227,7 +227,7 @@ function amenity_process_relation(object)
address = address,
wheelchair = wheelchair,
wheelchair_desc = wheelchair_desc,
geom = { create = 'area' }
geom = object:as_multipolygon()
})

end
Expand Down
42 changes: 21 additions & 21 deletions flex-config/style/building.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ tables.building_point = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'node', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text' , not_null = true},
{ column = 'osm_subtype', type = 'text'},
{ column = 'name', type = 'text' },
{ column = 'levels', type = 'int'},
{ column = 'osm_type', type = 'text' , not_null = true},
{ column = 'osm_subtype', type = 'text'},
{ column = 'name', type = 'text' },
{ column = 'levels', type = 'int'},
{ column = 'height', sql_type = 'numeric'},
{ column = 'housenumber', type = 'text'},
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'state', type = 'text'},
{ column = 'postcode', type = 'text'},
{ column = 'address', type = 'text', not_null = true},
{ column = 'wheelchair', type = 'text'},
{ column = 'wheelchair_desc', type = 'text'},
{ column = 'operator', type = 'text'},
{ column = 'geom', type = 'point', projection = srid},
{ column = 'geom', type = 'point', projection = srid, not_null = true},
}
})

Expand All @@ -32,21 +32,21 @@ tables.building_polygon = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'way', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text' , not_null = true},
{ column = 'osm_subtype', type = 'text'},
{ column = 'name', type = 'text' },
{ column = 'levels', type = 'int'},
{ column = 'height', sql_type = 'numeric'},
{ column = 'osm_type', type = 'text', not_null = true},
{ column = 'osm_subtype', type = 'text'},
{ column = 'name', type = 'text' },
{ column = 'levels', type = 'int'},
{ column = 'height', sql_type = 'numeric'},
{ column = 'housenumber', type = 'text'},
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'street', type = 'text' },
{ column = 'city', type = 'text' },
{ column = 'state', type = 'text'},
{ column = 'postcode', type = 'text'},
{ column = 'address', type = 'text', not_null = true},
{ column = 'wheelchair', type = 'text'},
{ column = 'wheelchair_desc', type = 'text'},
{ column = 'operator', type = 'text'},
{ column = 'geom', type = 'multipolygon', projection = srid},
{ column = 'geom', type = 'multipolygon', projection = srid, not_null = true},
}
})

Expand Down Expand Up @@ -148,7 +148,7 @@ function building_process_node(object)
local height = parse_to_meters(object.tags['height'])
local operator = object.tags.operator

tables.building_point:add_row({
tables.building_point:insert({
osm_type = osm_types.osm_type,
osm_subtype = osm_types.osm_subtype,
name = name,
Expand All @@ -163,7 +163,7 @@ function building_process_node(object)
levels = levels,
height = height,
operator = operator,
geom = { create = 'point' }
geom = object:as_point()
})


Expand Down Expand Up @@ -197,7 +197,7 @@ function building_process_way(object)
local height = parse_to_meters(object.tags['height'])
local operator = object.tags.operator

tables.building_polygon:add_row({
tables.building_polygon:insert({
osm_type = osm_types.osm_type,
osm_subtype = osm_types.osm_subtype,
name = name,
Expand All @@ -212,7 +212,7 @@ function building_process_way(object)
levels = levels,
height = height,
operator = operator,
geom = { create = 'area' }
geom = object:as_polygon()
})


Expand Down Expand Up @@ -245,7 +245,7 @@ function building_process_relation(object)
local operator = object.tags.operator

if object.tags.type == 'multipolygon' or object.tags.type == 'boundary' then
tables.building_polygon:add_row({
tables.building_polygon:insert({
osm_type = osm_types.osm_type,
osm_subtype = osm_types.osm_subtype,
name = name,
Expand All @@ -260,7 +260,7 @@ function building_process_relation(object)
levels = levels,
height = height,
operator = operator,
geom = { create = 'area' }
geom = object:as_multipolygon()
})
end
end
Expand Down
73 changes: 36 additions & 37 deletions flex-config/style/indoor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ tables.indoor_point = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'node', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'name', type = 'text' },
{ column = 'layer', type = 'int', not_null = false },
{ column = 'level', type = 'text'},
{ column = 'room', type = 'text'},
{ column = 'entrance', type = 'text'},
{ column = 'door', type = 'text'},
{ column = 'capacity', type = 'text'},
{ column = 'highway', type = 'text'},
{ column = 'geom', type = 'point' , projection = srid},
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'name', type = 'text' },
{ column = 'layer', type = 'int', not_null = false },
{ column = 'level', type = 'text'},
{ column = 'room', type = 'text'},
{ column = 'entrance', type = 'text'},
{ column = 'door', type = 'text'},
{ column = 'capacity', type = 'text'},
{ column = 'highway', type = 'text'},
{ column = 'geom', type = 'point' , projection = srid, not_null = true},
}
})

Expand All @@ -26,16 +26,16 @@ tables.indoor_line = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'way', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'name', type = 'text' },
{ column = 'layer', type = 'int', not_null = false },
{ column = 'level', type = 'text'},
{ column = 'room', type = 'text'},
{ column = 'entrance', type = 'text'},
{ column = 'door', type = 'text'},
{ column = 'capacity', type = 'text'},
{ column = 'highway', type = 'text'},
{ column = 'geom', type = 'linestring' , projection = srid},
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'name', type = 'text' },
{ column = 'layer', type = 'int', not_null = false },
{ column = 'level', type = 'text'},
{ column = 'room', type = 'text'},
{ column = 'entrance', type = 'text'},
{ column = 'door', type = 'text'},
{ column = 'capacity', type = 'text'},
{ column = 'highway', type = 'text'},
{ column = 'geom', type = 'linestring', projection = srid, not_null = true},
}
})

Expand All @@ -45,16 +45,16 @@ tables.indoor_polygon = osm2pgsql.define_table({
schema = schema_name,
ids = { type = 'way', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'name', type = 'text' },
{ column = 'layer', type = 'int', not_null = false },
{ column = 'level', type = 'text'},
{ column = 'room', type = 'text'},
{ column = 'entrance', type = 'text'},
{ column = 'door', type = 'text'},
{ column = 'capacity', type = 'text'},
{ column = 'highway', type = 'text'},
{ column = 'geom', type = 'multipolygon' , projection = srid},
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'name', type = 'text' },
{ column = 'layer', type = 'int', not_null = false },
{ column = 'level', type = 'text'},
{ column = 'room', type = 'text'},
{ column = 'entrance', type = 'text'},
{ column = 'door', type = 'text'},
{ column = 'capacity', type = 'text'},
{ column = 'highway', type = 'text'},
{ column = 'geom', type = 'multipolygon' , projection = srid, not_null = true},
}
})

Expand Down Expand Up @@ -98,7 +98,7 @@ function indoor_process_node(object)
local capacity = object.tags.capacity
local highway = object.tags.highway

tables.indoor_point:add_row({
tables.indoor_point:insert({
osm_type = osm_type,
name = name,
layer = layer,
Expand All @@ -108,7 +108,7 @@ function indoor_process_node(object)
door = door,
capacity = capacity,
highway = highway,
geom = { create = 'point' }
geom = object:as_point()
})

end
Expand All @@ -119,7 +119,6 @@ function indoor_process_way(object)
return
end


local osm_type = get_osm_type(object)
local name = get_name(object.tags)
local layer = parse_layer_value(object.tags.layer)
Expand All @@ -131,7 +130,7 @@ function indoor_process_way(object)
local highway = object.tags.highway

if object.is_closed then
tables.indoor_polygon:add_row({
tables.indoor_polygon:insert({
osm_type = osm_type,
name = name,
layer = layer,
Expand All @@ -141,10 +140,10 @@ function indoor_process_way(object)
door = door,
capacity = capacity,
highway = highway,
geom = { create = 'area' }
geom = object:as_polygon()
})
else
tables.indoor_line:add_row({
tables.indoor_line:insert({
osm_type = osm_type,
name = name,
layer = layer,
Expand All @@ -154,7 +153,7 @@ function indoor_process_way(object)
door = door,
capacity = capacity,
highway = highway,
geom = { create = 'line' }
geom = object:as_linestring()
})
end

Expand Down
Loading