Skip to content

Commit 12f81c4

Browse files
author
Andy Townsend
committed
Move the "treat parking spaces as private parking" logic
from the shared lua to the raster-only code and set `parking_space`, because the vector code now interprets `parking_space` directly.
1 parent 28e39a4 commit 12f81c4

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

changelog.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Changes made to this rendering
22
This page describes changes made in these projects: [SomeoneElse-style](https://github.com/SomeoneElseOSM/SomeoneElse-style), [SomeoneElse-style-legend](https://github.com/SomeoneElseOSM/SomeoneElse-style-legend) and [openstreetmap-carto-AJT](https://github.com/SomeoneElseOSM/openstreetmap-carto-AJT), and visible [on this site](//map.atownsend.org.uk/maps/map/map.html).
33

4-
## As yet unreleased (raster only)
4+
## 05/01/2024 (shared code; raster release and previous vector releases)
55
Change the colour of the fill used for grass runways from the regular runway fill to "grass" (#b6fdb6).
66
Removed `tourism=attraction` from the list of things that get `unnamedcommercial` landuse.
77
Detect marine water-based power stations (wave power etc.) and exclude from regular "industrial" power stations.
@@ -12,6 +12,7 @@ Remove `area:aeroway` if `aeroway` is set.
1212
(raster and vector) Show an `orchard` fill for plant nurseries.
1313
(raster and vector) Append directions for `informationroutemarker` (mostly `route_marker`) as well as `informationmarker` (mostly `guidepost`).
1414
Fixed bug whereby `disused:aeroway` was cleared in error.
15+
Move the "treat parking spaces as private parking" logic from the shared lua to the raster-only code and set `parking_space`, because the vector code now interprets `parking_space` directly.
1516

1617
## 27/12/2024 (shared vector code only)
1718
Ensure that tourist accommodation in historic watermills and windmills is correctly shown as tourist accommodation.

shared_lua.lua

+6-5
Original file line numberDiff line numberDiff line change
@@ -4326,6 +4326,10 @@ function consolidate_lua_03_t( passedt )
43264326
-- https://github.com/SomeoneElseOSM/SomeoneElse-style/issues/14
43274327
--
43284328
-- Also map emergency bays (used in place of hard shoulders) in the same way.
4329+
-- Although we treat parking spaces as "types of parking", we ensure that
4330+
-- "parking_space" is always set to something so that raster- or
4331+
-- vector-specific rendering code can adjust it further.(raster will want to
4332+
-- set it "no").
43294333
-- ----------------------------------------------------------------------------
43304334
if (( passedt.amenity == "parking_space" ) or
43314335
( passedt.highway == "emergency_bay" )) then
@@ -4337,19 +4341,16 @@ function consolidate_lua_03_t( passedt )
43374341
passedt.amenity = "parking_paydisabled"
43384342
else
43394343
passedt.amenity = "parking_pay"
4344+
passedt.parking_space = "parking_pay"
43404345
end
43414346
else
43424347
if ( passedt.parking_space == "disabled" ) then
43434348
passedt.amenity = "parking_freedisabled"
43444349
else
43454350
passedt.amenity = "parking"
4351+
passedt.parking_space = "parking"
43464352
end
43474353
end
4348-
4349-
if (( passedt.access == nil ) or
4350-
( passedt.access == "" )) then
4351-
passedt.access = "no"
4352-
end
43534354
end
43544355

43554356
-- ----------------------------------------------------------------------------

style.lua

+11
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,17 @@ function filter_tags_generic(keyvalues, nokeys)
530530
-- ----------------------------------------------------------------------------
531531
consolidate_lua_03_t( keyvalues )
532532

533+
-- ----------------------------------------------------------------------------
534+
-- We set 'access = "no"' here on all parking spaces and highway emergency
535+
-- bays, for raster rendering purposes.
536+
-- It's not done in the shared code in case other consumers of the schema want
537+
-- to do something else.
538+
-- ----------------------------------------------------------------------------
539+
if (( keyvalues["parking_space"] ~= nil ) and
540+
( keyvalues["parking_space"] ~= "" )) then
541+
keyvalues["access"] = "no"
542+
end
543+
533544
-- ----------------------------------------------------------------------------
534545
-- Remove admin boundaries from the map
535546
-- I do this because I'm simply not interested in admin boundaries and I'm

0 commit comments

Comments
 (0)