[styles] Add disused business POIs (e.g. disused:shop)

Signed-off-by: map-per <map-per@gmx.de>
This commit is contained in:
map-per
2025-10-22 18:56:36 +02:00
committed by map-per
parent da7c3d6710
commit 5886d15e88
9 changed files with 47 additions and 1 deletions

View File

@@ -1286,6 +1286,7 @@
<string name="type.shop.watches">Watch Store</string> <string name="type.shop.watches">Watch Store</string>
<string name="type.shop.wholesale">Wholesale Store</string> <string name="type.shop.wholesale">Wholesale Store</string>
<string name="type.shop.lighting">Lighting Shop</string> <string name="type.shop.lighting">Lighting Shop</string>
<string name="type.disusedbusiness">Vacant Business</string>
<string name="type.sport">Sport</string> <string name="type.sport">Sport</string>
<string name="type.sport.multi">Various Sports</string> <string name="type.sport.multi">Various Sports</string>
<string name="type.sport.9pin">Bowling</string> <string name="type.sport.9pin">Bowling</string>

View File

@@ -1362,7 +1362,7 @@ historic|memorial|plaque;[historic=memorial][memorial=plaque],[historic=memorial
historic|castle|defensive;[historic=castle][castle_type=defensive];;name;int_name;1234; historic|castle|defensive;[historic=castle][castle_type=defensive];;name;int_name;1234;
historic|castle|stately;[historic=castle][castle_type=stately];;name;int_name;1235; historic|castle|stately;[historic=castle][castle_type=stately];;name;int_name;1235;
attraction|animal;1236; attraction|animal;1236;
deprecated:tourism|attraction|specified:03.2024;[tourism=attraction][attraction=specified];x;name;int_name;1237;tourism|attraction disusedbusiness;[disused:shop?],[disused:amenity=restaurant],[disused:amenity=fast_food],[disused:amenity=cafe],[disused:amenity=pub],[disused:amenity=bar];;;;1237;
cuisine|regional;1238; cuisine|regional;1238;
cuisine|pizza;1239; cuisine|pizza;1239;
cuisine|burger;1240; cuisine|burger;1240;
Can't render this file because it contains an unexpected character in line 7 and column 16.

View File

@@ -0,0 +1,4 @@
<svg height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg">
<title>disusedbusiness-m</title>
<path d="m9 0c4.9705627 0 9 4.02943725 9 9 0 4.9705627-4.0294373 9-9 9-4.97056275 0-9-4.0294373-9-9 0-4.97056275 4.02943725-9 9-9zm0 .75c-4.55634919 0-8.25 3.69365081-8.25 8.25 0 4.5563492 3.69365081 8.25 8.25 8.25 4.5563492 0 8.25-3.6936508 8.25-8.25 0-4.55634919-3.6936508-8.25-8.25-8.25zm-5.266875 2.983125c.174375-.17625.459375-.17625.635625 0l1.2075 1.209375c.1725-.091875.365625-.1425.56625-.1425h5.715c.455625 0 .87.256875 1.074375.66375l1.063125 2.131875c.0675.135.103125.285.103125.435 0 .511875-.3975.931875-.9.9675v3.568125l1.06875 1.06875c.17625.174375.174375.459375 0 .635625s-.459375.17625-.635625 0l-9.9-9.9c-.174375-.17625-.1725-.46125.001875-.6375zm.830625 2.739375 2.5275 2.5275h-1.09125v2.1c0 .165.135.3.3.3h2.4c.165 0 .3-.135.3-.3v-.19125l1.2 1.2v.19125c0 .496875-.403125.9-.9.9h-3.6c-.496875 0-.9-.403125-.9-.9v-3.301875c-.5025-.035625-.9-.455625-.9-.9675 0-.151875.035625-.3.103125-.435zm7.43625 2.5275h-2.36625l2.36625 2.36625z" fill="#777777"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -51,6 +51,11 @@ node|z16-[shop],
node|z18-[shop], node|z18-[shop],
{icon-image: shop-m.svg;} {icon-image: shop-m.svg;}
node|z20-[disused:shop],
{icon-min-distance: 10;}
node|z20-[disused:shop],
{icon-image: disusedbusiness-m.svg;}
/* 2. NATURAL */ /* 2. NATURAL */
node|z13-[natural=volcano], node|z13-[natural=volcano],

View File

@@ -1263,6 +1263,7 @@ amenity-motorcycle_parking # icon z17- (also has captio
amenity-parking-permissive # icon z16- (also has caption(optional) z18-, area z15-) amenity-parking-permissive # icon z16- (also has caption(optional) z18-, area z15-)
amenity-parking_entrance # icon z17- (also has caption(optional) z19-) amenity-parking_entrance # icon z17- (also has caption(optional) z19-)
amenity-parking_entrance-permissive # icon z17- (also has caption(optional) z19-) amenity-parking_entrance-permissive # icon z17- (also has caption(optional) z19-)
disusedbusiness # icon z20-
emergency-emergency_ward_entrance # icon z16- (also has caption(optional) z18-) emergency-emergency_ward_entrance # icon z16- (also has caption(optional) z18-)
=== 250 === 250

View File

@@ -0,0 +1,4 @@
<svg height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg">
<title>disusedbusiness-m</title>
<path d="m9 0c4.9705627 0 9 4.02943725 9 9 0 4.9705627-4.0294373 9-9 9-4.97056275 0-9-4.0294373-9-9 0-4.97056275 4.02943725-9 9-9zm0 .75c-4.55634919 0-8.25 3.69365081-8.25 8.25 0 4.5563492 3.69365081 8.25 8.25 8.25 4.5563492 0 8.25-3.6936508 8.25-8.25 0-4.55634919-3.6936508-8.25-8.25-8.25zm-5.266875 2.983125c.174375-.17625.459375-.17625.635625 0l1.2075 1.209375c.1725-.091875.365625-.1425.56625-.1425h5.715c.455625 0 .87.256875 1.074375.66375l1.063125 2.131875c.0675.135.103125.285.103125.435 0 .511875-.3975.931875-.9.9675v3.568125l1.06875 1.06875c.17625.174375.174375.459375 0 .635625s-.459375.17625-.635625 0l-9.9-9.9c-.174375-.17625-.1725-.46125.001875-.6375zm.830625 2.739375 2.5275 2.5275h-1.09125v2.1c0 .165.135.3.3.3h2.4c.165 0 .3-.135.3-.3v-.19125l1.2 1.2v.19125c0 .496875-.403125.9-.9.9h-3.6c-.496875 0-.9-.403125-.9-.9v-3.301875c-.5025-.035625-.9-.455625-.9-.9675 0-.151875.035625-.3.103125-.435zm7.43625 2.5275h-2.36625l2.36625 2.36625z" fill="#747e86"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1264,6 +1264,7 @@ amenity-motorcycle_parking # icon z17- (also has captio
amenity-parking-permissive # icon z16- (also has caption(optional) z18-, area z15-) amenity-parking-permissive # icon z16- (also has caption(optional) z18-, area z15-)
amenity-parking_entrance # icon z17- (also has caption(optional) z19-) amenity-parking_entrance # icon z17- (also has caption(optional) z19-)
amenity-parking_entrance-permissive # icon z17- (also has caption(optional) z19-) amenity-parking_entrance-permissive # icon z17- (also has caption(optional) z19-)
disusedbusiness # icon z20-
emergency-emergency_ward_entrance # icon z16- (also has caption(optional) z18-) emergency-emergency_ward_entrance # icon z16- (also has caption(optional) z18-)
=== 250 === 250

View File

@@ -267,6 +267,8 @@ public:
BicycleOnedir, BicycleOnedir,
Ferry, Ferry,
ShuttleTrain, ShuttleTrain,
DisusedBusiness,
Building,
Count Count
}; };
@@ -306,6 +308,8 @@ public:
{BicycleOnedir, {"hwtag", "onedir_bicycle"}}, {BicycleOnedir, {"hwtag", "onedir_bicycle"}},
{Ferry, {"route", "ferry"}}, {Ferry, {"route", "ferry"}},
{ShuttleTrain, {"route", "shuttle_train"}}, {ShuttleTrain, {"route", "shuttle_train"}},
{DisusedBusiness, {"disusedbusiness"}},
{Building, {"building"}},
}; };
m_types.resize(static_cast<size_t>(Count)); m_types.resize(static_cast<size_t>(Count));
@@ -1074,6 +1078,31 @@ void PostprocessElement(OsmElement * p, FeatureBuilderParams & params)
} }
} }
// Clear POI attributes for disused businesses (e.g. disused:shop)
for (uint32_t t : params.m_types)
{
if (t == types.Get(CachedTypes::DisusedBusiness))
{
// Avoid removing attributes in cases where e.g. shop AND disused:shop are present
bool hasPoiType = false;
for (uint32_t type : params.m_types)
{
ftype::TruncValue(type, 1);
if (type != types.Get(CachedTypes::WheelchairAny) && type != types.Get(CachedTypes::InternetAny)
&& type != types.Get(CachedTypes::DisusedBusiness) && type != types.Get(CachedTypes::Building))
{
hasPoiType = true;
break;
}
}
if (!hasPoiType)
params.ClearPOIAttribs();
break;
}
}
// Process yes/no tags. // Process yes/no tags.
TagProcessor(p).ApplyRules({ TagProcessor(p).ApplyRules({
{"wheelchair", "designated", [&AddParam] { AddParam(CachedTypes::WheelchairYes); }}, {"wheelchair", "designated", [&AddParam] { AddParam(CachedTypes::WheelchairYes); }},

View File

@@ -1382,6 +1382,7 @@
"type.shop.watches" = "Watch Store"; "type.shop.watches" = "Watch Store";
"type.shop.wholesale" = "Wholesale Store"; "type.shop.wholesale" = "Wholesale Store";
"type.shop.lighting" = "Lighting Shop"; "type.shop.lighting" = "Lighting Shop";
"type.disusedbusiness" = "Vacant Business";
"type.sport" = "Sport"; "type.sport" = "Sport";
"type.sport.multi" = "Various Sports"; "type.sport.multi" = "Various Sports";
"type.sport.9pin" = "Bowling"; "type.sport.9pin" = "Bowling";