Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outline coordination (meta issue) #3045

Open
polarbearing opened this issue Jan 30, 2018 · 58 comments
Open

Outline coordination (meta issue) #3045

polarbearing opened this issue Jan 30, 2018 · 58 comments

Comments

@polarbearing
Copy link
Contributor

polarbearing commented Jan 30, 2018

Some areas on the map already use outlines, for other features it has been proposed.
This issue intends to coordinate such approaches and find a common language among them, following on #1624 which discusses some candidates.

Current use of outlines

Examples are in z13 and z17.

large parks/reserves

Double line with a darker outside and a more transparent inside. That visualises the direction of the outline even when only parts of the polygon is in the viewer's window.

tourism = theme_park, tourism = zoo, identical, color = #660033 (changed from tourism brown #734a08 in #3582):

  • dark line (z>=10): width 1, opacity 0.5, (z>=17): width 2, painted in addition to the light line
  • light line (z>=10): width 4, opacity 0.3, (z>=17): width 6
  • some fine tuning depending on way size and zoom level
    new: tourism-new - old: z13_berlin_zoo z17_berlin_zoo

nature=reserve

  • dark line (z>=10): width 2, opacity 0.15, color green, painted in addition to the light line
  • light line (z>=10): width 4, opacity 0.15, color green, (z>=14) width 6
    z13_nat_reserve z17_nat_reserve

hatched overlays

landuse=military

  • line width 3, color military #f55, opacity 0.329, pattern military_red_hatch.png
  • Line has no offset so it spills into the neighbourhood and over its fence, see the merge effect with the green.
  • Hatching over buildings.
    z13_miltary z17_miltary

amenity=prison

  • line width 3, color #888, opacity 0.329, pattern grey_vertical_hatch.png
  • Line has no offset so it spills into the neighbourhood and over its fence.
  • Hatching under buildings.
    z13_prison z17_prison

Proposed outlines:

tourism=museum areas #2704
tourism=(accommodation) on the example of leisure=resort #2290
amenity=(uniformed services), i.e. military, police, fire brigade, some drafts in #2670, #3035
boundary=protected area #603
amenity= monastery #3036
leisure=dog_park #3041
boundary=aboriginal_lands #3520

@kocio-pl
Copy link
Collaborator

I don't have a time to look at it, but big thanks for pushing this forward!

@Slawek234
Copy link

Slawek234 commented Jan 30, 2018

I propose. Unfortunately, I do not have artistic skills so there are not many pictures.

tourism=theme_park, tourism=zoo these are purely commercial and entertainment areas designed mainly for children's entertainment. Should be marked with a bright, intense color (like school, landuse=retail, landuse=commercial) I suggest yellow, orange or red
https://s17.postimg.org/uf8dpbhbz/pomara.png , https://s17.postimg.org/5jey1num7/z_te.jpg or red https://s17.postimg.org/5lytop0wf/red2.jpg

tourism=museum This is the largest group of objects to be considered. These are various areas of an educational nature, which is why a more subdued color would brown #734a08: exactly the same as it is currently used by tourism=theme_park, tourism=zoo.

amenity=monastery I think landuse=religous it's fine right now. If not, possibly a border slightly darker than #734a08: or violet border https://postimg.org/image/t94dqpg8b/

amenity=prison this is a place of isolation, and it should not be distinguished in any way from surrounding the current method of tagging should take hold.

landuse=military the area should be less noticeable at the moment it is too bright, leaving aside that the military areas should be camouflaged:) I would suggest changing the color to gray just like amenity=prison. Since this is not an area that should attract tourists with its color, the meaning of gray should be ok. Contrary to appearances, large gray areas also stand out, but not as in shades of red.

In my opinion, strategic places such as Military areas, police and low importance as prisons should not stand out too much from other areas. The gray color would be fine here.

There is also an area that is eagerly mapped all over the world, but there is no definition on the wiki children's traffic park or traffic town I suggest roses https://s17.postimg.org/x9bj2qwcv/r_owy.png or blue https://s17.postimg.org/p3th4g2xb/granat.png https://wiki.openstreetmap.org/wiki/Talk:Tag:leisure%3Dplayground #Possible combination or new Tag?

nature=reserve I do not feel the need for a bigger change in this case for now.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Feb 5, 2018

Military area (#f3dad5) without the hatching (with and without the barrier) compared to commercial, retail, industrial and power areas around:
yhftz2yv
vgzui0dl

What do you think about it?

@polarbearing
Copy link
Contributor Author

Is that solid fill colour under everything? I'd indeed prefer that to the current transparent overlay which causes tinting. Are the different outline colours in the first example only from the barrier?

@kocio-pl
Copy link
Collaborator

kocio-pl commented Feb 5, 2018

Is that solid fill colour under everything?

More or less. Currently it's done by overlaying transparent raster file, so when I gave up with more subtle methods, I just tried to pick the resulting color from rendering. Hence it's probably mix of lighter parts of this file with ground color, but that's probably the most typical case.

Applying it in a rough way hides all the buildings, but that's not important in this phase.

Are the different outline colours in the first example only from the barrier?

Yes, I think so.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Feb 5, 2018

General thoughts about military areas:

  • some offset could be used for the outline, that would make the barrier to be outside and more readable (currently it's located in the middle, so it looks like the color of the outline is darker, as you have noted), the downside would be rendering two adjacent military areas (like here) even more visibly, but I guess that's not as frequent as barrier around and might be acceptable.
  • if we use standard background instead of overlaying color, the military areas in the forest will become highly visible (as a result of smaller areas shown inside bigger areas) - this might be desirable (such places are effectively not part of the general forest) or not desirable (too much attention to private area, especially pink areas on the water).

@polarbearing
Copy link
Contributor Author

Outlines should be offset inwards into the polygon (as with the current zoo). When you shift them outwards they interact badly with adjacent areas. Current military is in the middle which already has some interaction, see my example in the first post.

The problem with military forest was probably the reason why hatching was chosen originally. We are running into the old issue of landuse vs. landcover.

I was searching the mapnik doc if there was some algorithmic area hatching without pattern files, but could not find any?

@kocio-pl
Copy link
Collaborator

kocio-pl commented Feb 5, 2018

My idea is to at least update current rendering:

  • move the outline inside the polygon (that would help with city walls, which are wider than typical barrier, so military outline is invisible then),
  • make new PNG with removed hatching (military_red.png) for standard military area (or do it without external file, if possible),
  • use this new military style also for police and fire services,
  • use the old PNG for danger areas (and remove other current elements for them).

I think that will improve rendering to a reasonable state, so we can think about further changes later.

@andrzej-r
Copy link
Contributor

This may work better for small areas like the ones in your examples but it will be almost as obnoxious at middle zoom levels (8-10) as it is now. In that scenarios it is mostly the border and fill that dot the map.

Consider (1) turning down the opacity of the fill colour and thickness of the boundary, or (2) greatly (>10x) increasing the size filter threshold. Preferably both.

To avoid stacking issues with other land uses I would suggest keeping these layers as transparent overlays as it is now. I don't know if it is technically possible but putting the overlay below buildings/roads and above land uses could work well.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Feb 5, 2018

Could you provide some code to test the suggested changes?

Current style code is here:

  • standard area:

    #landuse-overlay {
    [landuse = 'military'][zoom >= 7][way_pixels > 900],
    [landuse = 'military'][zoom >= 8][way_pixels > 100],
    [landuse = 'military'][zoom >= 10][way_pixels > 75] {
    polygon-pattern-file: url('symbols/military_red_hatch.png');
    polygon-pattern-alignment: global;
    line-color: @military;
    line-width: 3;
    line-opacity: 0.329;
    }
    }

    @military: #f55;

  • danger area:

    [feature = 'military_danger_area'] {
    [zoom >= 9][zoom < 11] {
    polygon-fill: @danger_area;
    polygon-opacity: 0.3;
    [way_pixels >= 4] { polygon-gamma: 0.75; }
    [way_pixels >= 64] { polygon-gamma: 0.3; }
    }
    [zoom >= 11] {
    polygon-fill: @danger_background;
    polygon-pattern-file: url('symbols/danger.svg');
    [way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
    [way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
    }
    }

    @danger_area: pink;
    @danger_background: #fcd8db;

@andrzej-r
Copy link
Contributor

I can provide it but it would be essentially the same code as in my previous proposal minus hatching. Is there anything you would like me to try or do differently this time?

@andrzej-r
Copy link
Contributor

BTW, my comment about placing the transparent overlay behind buildings etc is incorrect - it is already the case in the current implementation. So it may be good to keep military areas as overlays.

I the evening I will prepare a new proposal implementing the following:

  • (more) transparent fill than before, preferably not using a raster image
  • no hatching
  • more aggressive filtering at mid zoom levels (way_pixel > 900 throughout)
  • (more) transparent borders. 2px wide with offset.

Does the above sound worth trying or do you want me to change/add anything?

@kocio-pl
Copy link
Collaborator

kocio-pl commented Feb 5, 2018

That sounds good.

BTW: why did you close the #3035?

@polarbearing
Copy link
Contributor Author

I'd like to have some clarity about what we want to show before we prepare any code or jump into details, that might save work in the long run. So, how visible should the landuse=military be, from a distance (low zoom) and close up (high zoom)?

An outline shows the perimeter well in low zoom, but when we are in the middle of the area we don't get that hint any more.

For other landuses, the area is shown via intransparent colour fill, with infrastructure on top. This will work for military as well (if we find a colour distinguishable enough from commercial), with one exeption, that are forests. You might have forest within the military, and military within forests.

Using a transparent overlay (if there is no hatching you probably don't need a PNG) is visible in both high and low zoom, but when zoomed in you don't get a clue why the colour is strangely tinted. Furthermore, as the eyes adjust to the overall colour of the area, the overlay becomes unrecognisable.

I don't know if @gravitystorm is following us here, but I remember he was fighting against transparencies for exactly this reason.

Things like how transparent outlines could be used, and their thickness, should be discussed separately, for different outline cases together. That was the prime goal of this meta issue here.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Feb 5, 2018

I believe that discussion is very general and might easily stuck at some point, so I'd like to make some limited steps when possible which are not turning for example the military areas upside down. Discussing transparency is important, but it can be resolved later (if ever, because this is tough problem).

Are there some things which you agree that can be changed without big hassle, so we could try to do that, or you think that nothing should be changed until we set general rules for outlining? I'd be happy to go on with these smaller changes and discussing big things in the background.

@Tomasz-W
Copy link

Tomasz-W commented Feb 5, 2018

use this new military style also for police and fire services,

I don't like this idea. Military area is dangerous (you can get shot there), but police/ fire stations are places where you can shelter from danger. For me, they are kind of opposite things and military style shouldn't include them.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Feb 5, 2018

Military danger area is defined separately and I plan to keep the hatching there. We look for similar things to make "clusters", but they can differ of course.

@andrzej-r
Copy link
Contributor

andrzej-r commented Feb 5, 2018

I'm happy going ahead with the plan above. Seems like a fair trade off and a good step forward from the current implementation. Otherwise we may have an endless debate on unification and aesthetics - that has derailed #3035, and may very well derail this ticket too.

I think unifying wrt "uniformed services" is a fine and easy to understand concept. Level of danger would also be OK but that may be too subjective (what about runways or volcanoes while we're at it?) and, aside of danger areas, not currently mapped.

My issue with military areas is that they tend to be quite big and often contain other land uses. So we need transparency/hatching and run into over prominent rendering issues at mid zoom levels. Nothing that couldn't be fixed with more aggressive filters, though.

I don't mind either transparency or hatching, assuming we are OK with a raster image I may keep very slight hatching (just a notch less transparent than the rest of the background), if only for familiarity reasons. Just transparency is also OK IMHO, once we are inside the area we no longer need visual hints about it, just like we don't need the name of the country when zoomed to a street level.

@andrzej-r
Copy link
Contributor

The following code:

#landuse-overlay {
  [landuse = 'military'][zoom >= 9][way_pixels > 900] {
    polygon-pattern-file: url('symbols/military_red_hatch.png');
    polygon-pattern-alignment: global;
    line-color: @military; 
    line-width: 2; 
    line-offset: -1.0;
    line-opacity: 0.24;
  }
}

Zoom >= 9 to match danger_area, more aggressive filtering. A bit more transparent borders, width=2 with offset. Fill opacity 0.08 with very a finer hatching pattern with only slightly higher opacity (0.16).

Results

Zoom=10:
ver2_l10

Zoom=14, note overlapping military+military areas and military+danger areas (in the proposed version the danger area is a bit easier to distinguish, although it would benefit from some fixes too), the thick border in the middle is in fact two 2px borders with offsets:
ver2_l14

@andrzej-r
Copy link
Contributor

andrzej-r@f9f190a
If you're happy with this version I'll make a PR. Otherwise let me know what to fix.

@polarbearing
Copy link
Contributor Author

I am happy in general as an intermediate fix to the current ugliness, thanks.
The line-offset fixes the current overspill into the neighbourhood, and the hatching is better than before.
In the example it seems that some areas are painted twice, but this is rather a tagging error, with the same landuse overlapping.

A small concern is the [landuse = 'military'][zoom >= 9][way_pixels > 900], which I understand that at any even high zoom level we only render objects >900. Probably from z13 or so we should render any size?

@andrzej-r
Copy link
Contributor

I've removed filtering at zoom>=13 and reduced border thickness at low zoom (no change at zoom>=15 when exact border location may be of interest). andrzej-r@b81bc8f
Preview at zoom=10:
ver3_l10

@gravitystorm
Copy link
Owner

Note that opacity-based artefacts can be reduced by using compositing. For example, to avoid problems where multiple overlapping landuse areas leads to unwanted effects, you can fill the polygons at full opacity and then use opacity: 0.5 on the layer/attachment to ensure that overlapping areas look the same as single areas.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Feb 6, 2018

@andrzej-r Since we agree that it'd be a good intermediate change, I guess you can open a PR.

There are many details we want to test, but they don't belong here. It was important to make sure that this change is not against global outline plans, but that's enough for now.

@eehpcm
Copy link

eehpcm commented Apr 23, 2018

A vote here to add historic=castle to the list.

The boundaries of a castle's outer fortifications may be well known even though some sections of wall may no longer be present. I consider it of interest to data consumers have that original outline visible in some way, in the same way that they can see the outline of an industrial estate or a school. In the case I'm thinking of, Cardigan Castle, that outline is somewhat similar to Cadw's listing of the castle as a scheduled monument (Cadw include some land outside the fortifications to the east, amongst other differences).

Although there are modern buildings within the extent of the fortifications they (and some buildings outside the fortifications) are all operated by the Castle Preservation Trust as a tourist attraction. There is some argument to be made for also marking that outer area to include all the things operated by the preservation trust despite being outside the original fortifications, but I can't think of a suitable tag. For example, itx would be nice for data consumers to know that the children's playground to the east is part of the "castle experience."

@kocio-pl
Copy link
Collaborator

Any news here, maybe something is ready for PR?

@polarbearing
Copy link
Contributor Author

Still interested to finish the museum and accomodation when a time budget comes along.

@polarbearing
Copy link
Contributor Author

wrong button, sorry

@HolgerJeromin
Copy link
Contributor

Border of education color is barely visible:
https://www.openstreetmap.org/way/286047412
image

@jragusa
Copy link
Contributor

jragusa commented Nov 19, 2018

Why not the same colour than the label ?

@eehpcm
Copy link

eehpcm commented Nov 19, 2018

@jragusa

Why not the same colour than the label ?

Good idea. We could have a black label on a black background. And when you click on it, it lights up black.

Yes, I stole that idea from Douglas Adams.

@Adamant36
Copy link
Contributor

@jragusa, it would probably be %30 darken (or whatever) of the main yellow color. I think that's how every other border color is.

@Tomasz-W
Copy link

Tomasz-W commented Nov 19, 2018

I prefer outline more than just a border (see #3045 (comment)), and some "darken, X%" of amenity yellow fill would propably work good.

@polarbearing
Copy link
Contributor Author

I see two separate issues here:

Border of education color is barely visible

This is apparently a side-effect of the recent changes of the education-colour. The border is supposed to make adjacent areas visible, this should be simply fixed b adjusting the border appropriate for the new fill colour. I opened #3519 for this.

I prefer outline more than just a border

This is a more general decision.

@almccon
Copy link
Contributor

almccon commented Dec 14, 2018

I'd like to add boundary=aboriginal_lands to the list of outlines we consider in this issue.

Now that the boundary=aboriginal_lands tag has just been approved, I have a proposed rendering for them in #3520. Basically, I proposed using the same style as national parks, but using a brown color instead of green. However, in order for that to work, we would probably want to change the zoo and theme_park rendering to a different color. Related discussion is #2704 about open-air museum areas.

@kocio-pl
Copy link
Collaborator

My proposition is to change zoo and theme_park to violet, which would make possible to merge brown outlines for aboriginal areas without visual clash.

We could also add orange border for museum and other cultural areas, but that is not crucial - it just helps to explain why choose violet for amusement (makes some sense to use less strong color for cultural areas).

@polarbearing
Copy link
Contributor Author

Added boundary=aboriginal_lands to top post.
Maybe we can make a list which outlines should remain in the wider, double-line style (dark 2px + light 6px) (currently theme_park, zoo), and which should use the single (3px) (currently military)

@Adamant36
Copy link
Contributor

@polarbearing, what are the pros and cons of each? Id think as more areas get mapped next to each other where double outline collusion (I think that's the issue with national park boundaries) might happen and more areas get outlines it would be good to have some kind of standardization and move away from the double-line style. I'm sure most people don't know or care what the difference is.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Dec 15, 2018

Double line is to make it clear which part is inside and which is outside. It is needed only for big areas which at the same time have no filling, so:

  • That's why military areas don't need it - we always see red hatching if we're inside.
  • That's also why we could use single line for natural parks on z8-z9 - they have light green filling (but on z10+ they don't have, so we need double lines then).
  • It's also not needed for relatively small areas (like zoo) - we can easily check if we're looking inside or outside.

@polarbearing
Copy link
Contributor Author

thanks kocio-pl, that's the reasoning I remember as well.
We already have an adjustment for the width of the double line dependent on zoom level.

I just had the idea we could make it dependent on way area as well.
The rule could be that if the object is small enough to fit onto a few tiles in the respective z level, it gets a single line, if it is larger, a double.

@jragusa
Copy link
Contributor

jragusa commented Dec 17, 2018

That's would make sense to create a document (or to include into CARTOGRAPHY.md) where all main rules like those indicated by @kocio-pl or those concerning the display of some features (number of occurrences for example) are listed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests