Skip to content

Commit

Permalink
Move the "treat parking spaces as private parking" logic
Browse files Browse the repository at this point in the history
from the shared lua to the raster-only code
and set `parking_space`,
because the vector code now interprets `parking_space` directly.
  • Loading branch information
Andy Townsend committed Jan 5, 2025
1 parent 28e39a4 commit 12f81c4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changes made to this rendering
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).

## As yet unreleased (raster only)
## 05/01/2024 (shared code; raster release and previous vector releases)
Change the colour of the fill used for grass runways from the regular runway fill to "grass" (#b6fdb6).
Removed `tourism=attraction` from the list of things that get `unnamedcommercial` landuse.
Detect marine water-based power stations (wave power etc.) and exclude from regular "industrial" power stations.
Expand All @@ -12,6 +12,7 @@ Remove `area:aeroway` if `aeroway` is set.
(raster and vector) Show an `orchard` fill for plant nurseries.
(raster and vector) Append directions for `informationroutemarker` (mostly `route_marker`) as well as `informationmarker` (mostly `guidepost`).
Fixed bug whereby `disused:aeroway` was cleared in error.
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.

## 27/12/2024 (shared vector code only)
Ensure that tourist accommodation in historic watermills and windmills is correctly shown as tourist accommodation.
Expand Down
11 changes: 6 additions & 5 deletions shared_lua.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4326,6 +4326,10 @@ function consolidate_lua_03_t( passedt )
-- https://github.com/SomeoneElseOSM/SomeoneElse-style/issues/14
--
-- Also map emergency bays (used in place of hard shoulders) in the same way.
-- Although we treat parking spaces as "types of parking", we ensure that
-- "parking_space" is always set to something so that raster- or
-- vector-specific rendering code can adjust it further.(raster will want to
-- set it "no").
-- ----------------------------------------------------------------------------
if (( passedt.amenity == "parking_space" ) or
( passedt.highway == "emergency_bay" )) then
Expand All @@ -4337,19 +4341,16 @@ function consolidate_lua_03_t( passedt )
passedt.amenity = "parking_paydisabled"
else
passedt.amenity = "parking_pay"
passedt.parking_space = "parking_pay"
end
else
if ( passedt.parking_space == "disabled" ) then
passedt.amenity = "parking_freedisabled"
else
passedt.amenity = "parking"
passedt.parking_space = "parking"
end
end

if (( passedt.access == nil ) or
( passedt.access == "" )) then
passedt.access = "no"
end
end

-- ----------------------------------------------------------------------------
Expand Down
11 changes: 11 additions & 0 deletions style.lua
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,17 @@ function filter_tags_generic(keyvalues, nokeys)
-- ----------------------------------------------------------------------------
consolidate_lua_03_t( keyvalues )

-- ----------------------------------------------------------------------------
-- We set 'access = "no"' here on all parking spaces and highway emergency
-- bays, for raster rendering purposes.
-- It's not done in the shared code in case other consumers of the schema want
-- to do something else.
-- ----------------------------------------------------------------------------
if (( keyvalues["parking_space"] ~= nil ) and
( keyvalues["parking_space"] ~= "" )) then
keyvalues["access"] = "no"
end

-- ----------------------------------------------------------------------------
-- Remove admin boundaries from the map
-- I do this because I'm simply not interested in admin boundaries and I'm
Expand Down

0 comments on commit 12f81c4

Please sign in to comment.