Separate quarter and neighbourhood

Signed-off-by: map-per <map-per@gmx.de>
This commit is contained in:
map-per 2025-01-29 15:01:19 +01:00 committed by Roman Tsisyk
parent 9b93d66f3d
commit 659af4bf1d
9 changed files with 93 additions and 18 deletions

View file

@ -7804,9 +7804,9 @@ sw:Kisiwa
fa:جزیره
mr:बेट
place-suburb|landuse-residential|place-neighbourhood
en:Suburb|district
ru:Район|микрорайон|округ|квартал
place-suburb|place-quarter|place-neighbourhood|landuse-residential
en:Suburb|district|quarter|neighbourhood|neighborhood
ru:Район|микрорайон|квартал
bg:Район|микрорайон|окръг|квартал
ar:حي سكني|ضاحية
cs:Předměstí|městská část|městská zóna
@ -7814,7 +7814,7 @@ da:Forstad|distrikt
nl:Buitenwijken|voorstad|wijk
fi:Esikaupunki
fr:Banlieue|arrondissement|quartier
de:Stadtteil|Kreis|Wohnbezirk|Wohnviertel
de:Stadtteil|Stadtviertel|Wohnviertel|Wohnbezirk|Siedlung
hi:मुहल्ला|उपनगर
hu:Kerület
id:Pinggiran kota

View file

@ -1018,7 +1018,7 @@ deprecated|deprecated;903;x
railway|subway|lightblue;[railway=subway][colour=lightblue];x;name;int_name;904;railway|subway|tunnel
deprecated|deprecated;905;x
railway|subway|lightgreen;[railway=subway][colour=lightgreen];x;name;int_name;906;railway|subway|tunnel
deprecated|deprecated;907;x
place|quarter;907;
railway|subway|violet;[railway=subway][colour=violet];x;name;int_name;908;railway|subway|tunnel
shop|rental;909;
railway|subway|grey;[railway=subway][colour=grey];x;name;int_name;910;railway|subway|tunnel
@ -1073,7 +1073,7 @@ craft|electronics_repair;958;
shop|appliance;959;
amenity|casino;960;
amenity|brothel;961;
place|neighbourhood;[place=neighbourhood],[place=quarter];;name;int_name;962;
place|neighbourhood;962;
place|isolated_dwelling;963;
historic|wayside_cross;964;
historic|wayside_shrine;965;

Can't render this file because it contains an unexpected character in line 7 and column 16.

View file

@ -21832,8 +21832,9 @@
zh-Hans = 地方
zh-Hant = 當地
[type.place.neighbourhood]
en = Neighbourhood
[type.place.quarter]
comment = Named part of a city or town, bigger than place=neighbourhood and smaller than place=suburb (Wiki: https://wiki.openstreetmap.org/wiki/Tag:place%3Dquarter)
en = Quarter
af = Buurt
ar = حي سكني
az = Qonşuluq
@ -21843,9 +21844,9 @@
da = Kvarter
de = Stadtviertel
el = Γειτονιά
es = Vecindario
es = Barrio
et = Naabruskond
eu = Auzo
eu = Auzoa
fa = محله
fi = Naapurusto
fr = Quartier
@ -21856,25 +21857,72 @@
it = Quartiere
ja = 地域
ko = 동네
lv = Apkaime
mr = शेजार
nb = Strøk
nl = Buurt
nl = Wijk
pl = Sąsiedztwo
pt = Bairro
pt-BR = Vizinhança
pt-BR = Sub-bairro
ro = Cartier
ru = Микрорайон
ru = Район / Микрорайон
sk = Štvrť
sr = Насеље
sv = Grannskap
sw = Mtaa
th = ละแวกบ้าน
tr = Mahalle
tr = Semt
uk = Мрорайон
vi = Vùng lân cận
zh-Hans = 邻里社区
zh-Hant = 鄰里社區
[type.place.neighbourhood]
comment = Named part of a city, town or suburb, smaller than place=quarter (Wiki: https://wiki.openstreetmap.org/wiki/Neighbourhood)
en = Neighbourhood
af = Buurt
ar = الحي
az = Qonşuluq
be = Наваколле
bg = Съседство
ca = Barri
cs = Sousedství
da = Nabolag
de = Siedlung
el = Γειτονιά
es = Vecindario
et = Naabruskond
eu = Barrutia
fa = محله
fi = Naapurusto
fr = Quartier
he = שְׁכוּנָה
hi = अड़ोस-पड़ोस
hu = Szomszédság
id = Lingkungan
it = Quartiere
ja = 近隣
ko = 이웃
lt = Kaimynystė
lv = Maza apkaime
mr = शेजारी
nb = Nabolag
nl = Buurt
pl = Sąsiedztwo
pt = Bairro
pt-BR = Vizinhança
ro = Cartier
ru = Микрорайон / ЖК
sk = Susedstvo
sv = Grannskapet
sw = Ujirani
th = ละแวกบ้าน
tr = Muhit
uk = Сусідство
vi = Hàng xóm
zh-Hans = 社区
zh-Hant = 鄰裡
[type.place.ocean]
en = Ocean
af = Oseaan
@ -22126,6 +22174,7 @@
zh-Hant = 州
[type.place.suburb]
comment = Named part of a city or town, bigger than place=quarter (Wiki: https://wiki.openstreetmap.org/wiki/Tag:place%3Dsuburb)
en = Suburb
af = Voorstad
ar = ضاحية
@ -22149,6 +22198,7 @@
it = Quartiere
ja = 区
ko = 교외
lv = Pilsētas apgabals
mr = उपनगर
nb = Forstad
nl = Buitenwijk
@ -22156,7 +22206,7 @@
pt = Subúrbio
pt-BR = Bairro
ro = Suburbie
ru = Район
ru = Район / Пригород
sk = Predmestie
sr = Кварт
sv = Förort

View file

@ -341,6 +341,7 @@ node|z13-[place=hamlet]
node|z10-14[place=suburb],
node|z13-[place=locality],
node|z13-[place=quarter],
node|z13-[place=neighbourhood],
node|z14-[place=farm],
node|z14-[place=isolated_dwelling],
@ -348,6 +349,7 @@ node|z17-[landuse=residential],
{text: name;text-color: @district_label;}
node|z13-14[place=suburb]::int_name,
node|z13-[place=locality]::int_name,
node|z13-[place=quarter]::int_name,
node|z13-[place=neighbourhood]::int_name,
node|z14-[place=farm]::int_name,
node|z14-[place=isolated_dwelling]::int_name,
@ -362,10 +364,27 @@ node|z12[place=suburb]
{font-size: 11;}
node|z12[place=suburb]::int_name
{font-size: 9;}
node|z13-14[place=suburb]
node|z13[place=suburb]
{font-size: 12;}
node|z13-14[place=suburb]::int_name
node|z13[place=suburb]::int_name
{font-size: 10;}
node|z14[place=suburb]
{font-size: 14;}
node|z14[place=suburb]::int_name
{font-size: 12;}
node|z13[place=quarter],
{font-size: 11;}
node|z13[place=quarter]::int_name,
{font-size: 9;}
node|z14[place=quarter],
{font-size: 12;}
node|z14[place=quarter]::int_name,
{font-size: 10;}
node|z15-[place=quarter],
{font-size: 14;}
node|z15-[place=quarter]::int_name,
{font-size: 12;}
node|z13-14[place=locality],
node|z13-14[place=neighbourhood],

View file

@ -289,6 +289,7 @@ waterway-waterfall # icon z13- (also has captio
=== 5800
place-hamlet # caption z13-
place-quarter # caption z13-
=== 5750
place-farm # caption z14-

View file

@ -289,6 +289,7 @@ waterway-waterfall # icon z10- (also has captio
=== 5800
place-hamlet # caption z13-
place-quarter # caption z13-
=== 5750
place-farm # caption z14-

View file

@ -261,6 +261,7 @@ IsSuburbChecker::IsSuburbChecker()
Classificator const & c = classif();
base::StringIL const types[] = {{"landuse", "residential"},
{"place", "neighbourhood"},
{"place", "quarter"},
{"place", "suburb"}};
for (auto const & e : types)
m_types.push_back(c.GetTypeByPath(e));
@ -268,7 +269,8 @@ IsSuburbChecker::IsSuburbChecker()
// `types` order should match next indices.
static_assert(static_cast<size_t>(SuburbType::Residential) == 0, "");
static_assert(static_cast<size_t>(SuburbType::Neighbourhood) == 1, "");
static_assert(static_cast<size_t>(SuburbType::Suburb) == 2, "");
static_assert(static_cast<size_t>(SuburbType::Quarter) == 2, "");
static_assert(static_cast<size_t>(SuburbType::Suburb) == 3, "");
}
SuburbType IsSuburbChecker::GetType(uint32_t t) const

View file

@ -141,6 +141,7 @@ enum class SuburbType
{
Residential = 0,
Neighbourhood,
Quarter,
Suburb,
Count
};

View file

@ -1269,6 +1269,7 @@ void Geocoder::GreedilyMatchStreetsWithSuburbs(BaseContext & ctx, CentersFilter
{
case ftypes::SuburbType::Residential: radius = kMaxResidentialRadiusM; break;
case ftypes::SuburbType::Neighbourhood: radius = kMaxNeighbourhoodRadiusM; break;
case ftypes::SuburbType::Quarter: radius = kMaxNeighbourhoodRadiusM; break;
case ftypes::SuburbType::Suburb: radius = kMaxSuburbRadiusM; break;
default: CHECK(false, ("Bad suburb type:", base::Underlying(suburbType)));
}