mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-28 17:03:38 +00:00
[styles] Deduplicate mapcss rules
Change done automatically using
``` zsh
for x in **/*.mapcss; do
rg --passthru -UN --pcre2 '^node\|([^,]+),?\narea\|\1,?' --replace 'node|$1,' $x | sponge $x;
rg --passthru -UN --pcre2 '^area\|([^,]+),?\nnode\|\1,?' --replace 'node|$1,' $x | sponge $x;
done
```
Follow up to #999
Signed-off-by: Filip Czaplicki <git@starsep.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
ca9b3535a8
commit
9c0e1abd15
@@ -39,14 +39,10 @@
|
||||
node|z1-2[place=continent],
|
||||
/* TODO: add to mapping
|
||||
node|z9-[place=archipelago],
|
||||
area|z9-[place=archipelago],
|
||||
*/
|
||||
node|z9-[place=island],
|
||||
area|z9-[place=island],
|
||||
node|z14-[natural=cape],
|
||||
area|z14-[natural=cape],
|
||||
node|z14-[place=islet],
|
||||
area|z14-[place=islet],
|
||||
{text: name; text-color: @district_label;}
|
||||
|
||||
node|z1-2[place=continent]
|
||||
@@ -54,42 +50,31 @@ node|z1-2[place=continent]
|
||||
|
||||
/*
|
||||
node|z9-[place=archipelago],
|
||||
area|z9-[place=archipelago],
|
||||
*/
|
||||
node|z9-[place=island],
|
||||
area|z9-[place=island],
|
||||
{font-size: 8;}
|
||||
|
||||
/*
|
||||
node|z12-[place=archipelago],
|
||||
area|z12-[place=archipelago],
|
||||
*/
|
||||
node|z12-[place=island],
|
||||
area|z12-[place=island]
|
||||
{font-size: 9;}
|
||||
|
||||
/*
|
||||
node|z14-[place=archipelago],
|
||||
area|z14-[place=archipelago],
|
||||
*/
|
||||
node|z14-[place=island],
|
||||
area|z14-[place=island],
|
||||
node|z14-[place=islet],
|
||||
area|z14-[place=islet],
|
||||
{font-size: 10;}
|
||||
|
||||
/*
|
||||
node|z16-[place=archipelago],
|
||||
area|z16-[place=archipelago],
|
||||
*/
|
||||
node|z16-[place=island],
|
||||
area|z16-[place=island],
|
||||
node|z16-[place=islet],
|
||||
area|z16-[place=islet],
|
||||
{font-size: 12;}
|
||||
|
||||
node|z14-[natural=cape],
|
||||
area|z14-[natural=cape]
|
||||
{font-size: 8;text-color: @poi_label;}
|
||||
|
||||
/* 3.COUNTRIES & STATES */
|
||||
@@ -483,7 +468,6 @@ area|z17-[landuse=plant_nursery],
|
||||
/* 5.2 Beach, Glacier, Desert, etc. */
|
||||
|
||||
area|z14-[natural=desert],
|
||||
area|z15-[natural=beach],
|
||||
node|z15-[natural=beach],
|
||||
{text: name;font-size: 10;text-color: @poi_label;}
|
||||
|
||||
@@ -523,7 +507,6 @@ line|z13-[natural=strait],
|
||||
node|z14-[natural=strait],
|
||||
node|z14-[natural=bay],
|
||||
node|z16-[natural=wetland],
|
||||
area|z16-[natural=wetland],
|
||||
{text:name;text-color: @water_label;text-halo-color: @water;text-halo-radius: 0.1;text-halo-opacity: 0.4;}
|
||||
|
||||
area|z10-[natural=water][!tunnel][bbox_area<4000000],
|
||||
@@ -631,10 +614,8 @@ area|z18-[piste:type=snow_park],
|
||||
|
||||
area|z15-[landuse=cemetery],
|
||||
node|z17-[landuse=cemetery],
|
||||
area|z17-[amenity=grave_yard],
|
||||
node|z17-[amenity=grave_yard],
|
||||
node|z17-[cemetery=grave],
|
||||
area|z17-[cemetery=grave],
|
||||
{icon-image: cemetery-m.svg; text: name; text-offset: 1; font-size: 10; text-color: @poi_label;}
|
||||
|
||||
/* 7.5 Pedestrian areas */
|
||||
@@ -649,12 +630,10 @@ area|z16-[place=square],
|
||||
{text: name;font-size: 11;text-color: @city_label;text-position: center;text-halo-color: @halo_park_label;text-halo-radius: 0.5;text-halo-opacity: 0.8;}
|
||||
/* 7.6 Military */
|
||||
|
||||
area|z16[landuse=military],
|
||||
node|z16[landuse=military]
|
||||
node|z16[landuse=military],
|
||||
{icon-image: military-m.svg;icon-min-distance: 10;}
|
||||
|
||||
area|z17-[landuse=military],
|
||||
node|z17-[landuse=military]
|
||||
node|z17-[landuse=military],
|
||||
{icon-image: military-m.svg;text-offset: 1;text: name;font-size: 10;text-color: @poi_label;}
|
||||
|
||||
/* 7.7 Commercial */
|
||||
@@ -665,10 +644,8 @@ area|z16-[landuse=commercial],
|
||||
|
||||
/* 8.BUILDINGS */
|
||||
|
||||
area|z16-[building],
|
||||
node|z16-[building],
|
||||
{text: name;text-color: @building_label;text-position: center;}
|
||||
area|z16-[building]::int_name,
|
||||
node|z16-[building]::int_name,
|
||||
{text:int_name;text-color: @building_label;text-position: center;}
|
||||
|
||||
@@ -712,16 +689,12 @@ node|z17-[man_made=breakwater]
|
||||
|
||||
/* 8.2 Building */
|
||||
|
||||
area|z16-17[building],
|
||||
node|z16-17[building],
|
||||
{font-size: 9;}
|
||||
area|z16-17[building]::int_name,
|
||||
node|z16-17[building]::int_name,
|
||||
{font-size: 8;}
|
||||
area|z18-[building],
|
||||
node|z18-[building],
|
||||
{font-size: 11;}
|
||||
area|z18-[building]::int_name,
|
||||
node|z18-[building]::int_name,
|
||||
{font-size: 10;}
|
||||
|
||||
|
||||
@@ -2040,7 +2040,6 @@ node|z17-[amenity=bicycle_parking],
|
||||
{icon-image: bicycle-parking-m.svg;}
|
||||
|
||||
node|z17-[amenity=bicycle_parking][covered=yes],
|
||||
area|z17-[amenity=bicycle_parking][covered=yes],
|
||||
{icon-image: bicycle-parking-covered-m.svg;}
|
||||
|
||||
node|z17-[amenity=motorcycle_parking],
|
||||
|
||||
Reference in New Issue
Block a user