reformat lua

This commit is contained in:
afischerdev 2023-05-24 11:33:32 +02:00
parent 7e57824d9f
commit 72195d3b4c

View file

@ -1,5 +1,4 @@
-- special config to calcule pseudo-tags / "Brouter project"
-- EssBee version 08/05/2023
local srid = 3857
@ -75,11 +74,11 @@ function has_area_tags(tags)
return tags.place
or tags.population
end
end
function osm2pgsql.process_node(object)
if (object.tags.place == 'city' or object.tags.place == 'town' or object.tags.place == 'municipality') and has_area_tags(object.tags) then
if (object.tags.place == 'city' or object.tags.place == 'town' or object.tags.place == 'municipality') and has_area_tags(object.tags) then
tables.cities:insert({
osm_id = object.id,
name = object.tags.name,
@ -105,7 +104,7 @@ if (object.tags.place == 'city' or object.tags.place == 'town' or object.tags.pl
end
function osm2pgsql.process_way(object)
local way_type = object:grab_tag('type')
local way_type = object:grab_tag('type')
if ( object.tags.natural == 'water') or (object.tags.landuse ~= nil ) or (object.tags.leisure ~= nil ) then
tables.polygons:insert({
@ -153,7 +152,7 @@ function osm2pgsql.process_relation(object)
way = object:as_multipolygon()
})
-- if (relation_type == 'boundary') and has_area_tags(object.tags) then
-- if (relation_type == 'boundary') and has_area_tags(object.tags) then
if (relation_type == 'boundary') then
tables.cities_rel:insert({
reltype = object.tags.relation_type,