Skip to content

Commit e32f2b6

Browse files
committed
Consistently use object:as_*() for geometry creation functions
1 parent 27eb95b commit e32f2b6

File tree

16 files changed

+23
-23
lines changed

16 files changed

+23
-23
lines changed

themes/basic/topics/generic-boundaries.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ themepark:add_table{
2424
themepark:add_proc('relation', function(object)
2525
if object.tags.type == 'boundary' or (object.tags.type == 'multipolygon' and object.tags.boundary) then
2626
themepark:insert('boundaries', {
27-
geom = object.as_multilinestring(),
27+
geom = object:as_multilinestring(),
2828
tags = object.tags
2929
})
3030
end

themes/basic/topics/generic-lines.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ themepark:add_table{
2424
themepark:add_proc('way', function(object)
2525
if not object.is_closed or not theme.has_area_tags(object.tags) then
2626
themepark:insert('lines', {
27-
geom = object.as_linestring(),
27+
geom = object:as_linestring(),
2828
tags = object.tags
2929
})
3030
end

themes/basic/topics/generic-points.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ themepark:add_table{
2323

2424
themepark:add_proc('node', function(object)
2525
themepark:insert('points', {
26-
geom = object.as_point(),
26+
geom = object:as_point(),
2727
tags = object.tags
2828
})
2929
end)

themes/basic/topics/generic-polygons.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ themepark:add_table{
2424
themepark:add_proc('way', function(object)
2525
if object.is_closed and theme.has_area_tags(object.tags) then
2626
themepark:insert('polygons', {
27-
geom = object.as_polygon(),
27+
geom = object:as_polygon(),
2828
tags = object.tags
2929
})
3030
end
@@ -33,7 +33,7 @@ end)
3333
themepark:add_proc('relation', function(object)
3434
if themepark:relation_is_area(object) then
3535
themepark:insert('polygons', {
36-
geom = object.as_multipolygon(),
36+
geom = object:as_multipolygon(),
3737
tags = object.tags
3838
})
3939
end

themes/basic/topics/generic-routes.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ themepark:add_table{
2424
themepark:add_proc('relation', function(object)
2525
if object.tags.type == 'route' then
2626
themepark:insert('routes', {
27-
geom = object.as_multilinestring(),
27+
geom = object:as_multilinestring(),
2828
tags = object.tags
2929
})
3030
end

themes/basic/topics/nwr.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,22 @@ themepark:add_table{
4949

5050
themepark:add_proc('node', function(object)
5151
themepark:insert('nodes', {
52-
geom = object.as_point(),
52+
geom = object:as_point(),
5353
tags = object.tags
5454
})
5555
end)
5656

5757
themepark:add_proc('way', function(object)
5858
themepark:insert('ways', {
59-
geom = object.as_linestring(),
59+
geom = object:as_linestring(),
6060
tags = object.tags,
6161
nodes = '{' .. table.concat(object.nodes, ',') .. '}'
6262
})
6363
end)
6464

6565
themepark:add_proc('relation', function(object)
6666
themepark:insert('relations', {
67-
geom = object.as_geometrycollection(),
67+
geom = object:as_geometrycollection(),
6868
tags = object.tags,
6969
members = object.members
7070
})

themes/experimental/topics/rivers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ themepark:add_proc('relation', function(object, data)
3636
kind = t.waterway
3737
}
3838

39-
a.geom = object.as_multilinestring()
39+
a.geom = object:as_multilinestring()
4040
themepark.themes.core.add_name(a, object)
4141
themepark:insert('rivers', a, t)
4242
end)

themes/shortbread_v1/topics/bridges.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ themepark:add_proc('area', function(object, data)
3434
layer = data.core.layer
3535
}
3636

37-
for sgeom in object.as_area():geometries() do
37+
for sgeom in object:as_area():geometries() do
3838
a.geom = sgeom
3939
themepark:insert('bridges', a, t)
4040
end

themes/shortbread_v1/topics/buildings.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ themepark:add_proc('area', function(object, data)
2828
local t = object.tags
2929

3030
if t.building and t.building ~= 'no' then
31-
for sgeom in object.as_area():geometries() do
31+
for sgeom in object:as_area():geometries() do
3232
local a = { geom = sgeom }
3333
themepark:insert('buildings', a, t)
3434
end

themes/shortbread_v1/topics/dams.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ themepark:add_proc('way', function(object, data)
4949

5050
if waterway == 'dam' then
5151
local a = { kind = waterway }
52-
a.geom = object.as_linestring()
52+
a.geom = object:as_linestring()
5353
themepark:insert('dam_lines', a, t)
5454
end
5555
end)
@@ -61,7 +61,7 @@ themepark:add_proc('area', function(object, data)
6161
if waterway == 'dam' then
6262
local a = { kind = waterway }
6363

64-
for sgeom in object.as_area():geometries() do
64+
for sgeom in object:as_area():geometries() do
6565
a.geom = sgeom
6666
themepark:insert('dam_polygons', a, t)
6767
end

0 commit comments

Comments
 (0)