gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.53k stars 818 forks source link

Lower rendering priority of offices in favor of building name #3794

Open IgorEliezer opened 5 years ago

IgorEliezer commented 5 years ago

EDIT: This issue was simplified into https://github.com/gravitystorm/openstreetmap-carto/issues/3794#issuecomment-498126905.

Expected behavior

POIs with office=* + indoor=* could have their rendering priority lowered so that the building that houses them can show its name.

I think it's more important to find the building name first at lower levels, z17 or z18, and then, at higher levels (z19), the indoor offices.

Actual behavior

I have mapped a few public buildings which have a couple of indoor offices. These buildings aren't amenities on their own, instead they are complementary or annex buildings of the townhall, so that amenity=townhall or amenity=community_centre would not apply, but I gave them only building=public or building=civic and a name. (EDIT: tried to add office=government to the building, the renderer still prefers to render the indoor office name first rather than the building's, which adds an extra, nameless, blue dot inside the building)

Due to the above, the office dots render before or at the same level as the buildings and the building name gets "covered" .

Alternatively, a building(:use)=public or building(:use)=civic could have their names rendered at least 1 step before.

There is the issue #3205, but this one differs as to rendering order between building name and indoor office.

Links and screenshots illustrating the problem

image https://www.openstreetmap.org/#map=19/-23.05045/-47.82520

Other cases: https://www.openstreetmap.org/way/536379108 https://www.openstreetmap.org/way/545744068

matkoniecz commented 5 years ago

indoor=* is not too useful as nearly all offices are indoor.

Problem of showing labels of one object type over less important icons of the same object type appeared also as #3722

IgorEliezer commented 5 years ago

indoor=* is not too useful as nearly all offices are indoor.

I agree. I added office=* tag to the buildings as a last resort to make them render their name because I thought the renderer would prioritize building=* + office=* + name=* over office=* + name=*. It was some sort of "tagging for the renderer" which I'm going to revert, since they are not offices on their own but public buildings with a couple of offices inside.

What if the renderer prioritize building name over the office name no matter if the latter is indoor or not?

matkoniecz commented 5 years ago

Main problem with that idea that tagging shop and building or office and building on the same object is not the best tagging (and it is causing some subtle problems), so it would be a poor idea to encourage it.

I agree that some offices that more important than another but AFAIK we have no solved problem how it can be done without increasing number of layers even more.

Prince-Kassad commented 5 years ago

Though it is probably not a good idea to copy all their rendering choices it is of note that Google Maps starts rendering most offices only from z19 on (exceptions are office=government and some special cases). Our decision to render all offices starting from z17 seems a bit questionable especially since they tend to be less important than shops and other amenities.

IgorEliezer commented 5 years ago

Our decision to render all offices starting from z17 seems a bit questionable especially since they tend to be less important than shops and other amenities. -- https://github.com/gravitystorm/openstreetmap-carto/issues/3794#issuecomment-497965547

It seems there could be a simpler approach compared to my initial idea: if offices start rendering from z18 or z19 (too much?) it opens room to render building names, which start rendering from z17.

jeisenbe commented 5 years ago

Here are test images of central Singapore.

Current rendering: all offices have a 4 pixel dot marker at z17 and 6 pixel marker at z18; some office names are shown at z17 (eg government offices), some others at z18, and the rest (eg office=yes) at z19.

Test rendering: Dots only shown on z18 and z19, documented office values have text labels at z18, undocumented values and office=yes labels remain at z19.

Telok Ayer, Singapore z17 - before z17-telok-ayer-before-office z18 before z18-telok-ayer-office-before

z17 after - building name visible (The Octogon) z17-telok-ayer-singapore-office-after z18 after z18-telok-ayer-singapore-office-after

Parliament House, z17 - before https://www.openstreetmap.org/#map=17/1.2880/103.8497 z17-parliament-house-office-before

z17 after - Parliament House building name visible z17-parliament-office-after

z18 is unchanged: z18-parliament-office-after

Unlike shops and restaurants, which get a dot at z17, offices would only be getting a dot at z18, but I think this is reasonable.

The dots for shops and restaurants can show you where to look for a concentration of places to eat or shop, but it's not much good to know that there is some time of offices in a certain area - if you want a lawyer, you need a lawyer, not an accountant or an NGO.

jeisenbe commented 5 years ago

This is the current office code. Certain values are prioritized with name labels at z17, but it's hard to decide if these are really more important than the other documented values that are shown at z18:

    [zoom >= 17] {
      [office = 'administrative'],
      [office = 'adoption_agency'],
      [office = 'educational_institution'],
      [office = 'employment_agency'],
      [office = 'energy_supplier'],
      [office = 'financial'],
      [office = 'government'],
      [office = 'newspaper'],
      [office = 'ngo'],
      [office = 'political_party'],
      [office = 'quango'],
      [office = 'religion'],
      [office = 'research'],
      [office = 'tax'],
      [office = 'telecommunication'],
      [office = 'water_utility'],
...
    // other documented office types
    [zoom >= 18] {
      [office = 'accountant'],
      [office = 'advertising_agency'],
      [office = 'architect'],
      [office = 'association'],
      [office = 'charity'],
      [office = 'company'],
      [office = 'estate_agent'],
      [office = 'forestry'],
      [office = 'foundation'],
      [office = 'guide'],
      [office = 'insurance'],
      [office = 'it'],
      [office = 'lawyer'],
      [office = 'logistics'],
      [office = 'moving_company'],
      [office = 'notary'],
      [office = 'physician'],
      [office = 'private_investigator'],
      [office = 'property_management'],
      [office = 'surveyor'],
      [office = 'tax_advisor'],
      [office = 'therapist'],
      [office = 'travel_agent'] {
...
    // all other offices
    [zoom >= 19] {

Also, I note that physician, therapist and administrative are deprecated values, so perhaps these should not be treated specially.

Adamant36 commented 5 years ago

"but it's hard to decide if these are really more important than the other documented values that are shown at z18"

I say no. There's zero reason a quango's office or an adoption agency should have rendering priority over say a lawyer.

Prince-Kassad commented 5 years ago

if you want a lawyer, you need a lawyer, not an accountant or an NGO.

Not to mention people who want a lawyer will probably not scroll through the map looking for a lawyer, they will enter in the search engine of their choice "lawyer in ". Nominatim is kind of deficient on that part but it isn't the purpose of the slippy map to compensate for Nominatim's limitations.

matkoniecz commented 5 years ago

I say no. There's zero reason a quango's office or an adoption agency should have rendering priority over say a lawyer.

Personally I see all of them on the similar level of importance, with various people at different time preferring different ones.

I see some more important offices, like government ones that are likely to be both widely used and important (though not always) and completely minor POIs that are useful only sometimes (and, yes, some government ones will also qualify but I see no way to distinguish minor government offices and major government offices).

jeisenbe commented 4 years ago

This is part of the bigger issue about prioitization, #3880