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

WIP Improve low-zoom levels #3074

Closed

Conversation

matthijsmelissen
Copy link
Collaborator

@matthijsmelissen matthijsmelissen commented Feb 16, 2018

This is a big pull request (might be split up later) to keep track of proposed changes on the low zoom levels.

This pull request does the following:

  • Change admin borders to thick non-transparent dark-green lines
  • Generalize (simplify) admin borders
  • Make placenames slightly darker
  • Render country/state labels dark green (color or borders)
  • Renders maritime borders blue
  • Render motorways on z6 and z7 slightly lighter

This PR also includes #3065 (give oceans outline and simplify shapefiles on z0-7), #3056 (improve country/state label rendering) and #2972 (add halo to roads on z6 and 7).

On a technical level, admin borders are now rendered from the individual lines rather than polygons. This is necessary because drawing admin borders from polygons means we always render two borders on top of each other (both sides of the border), which means borders are always rendered unnecessarily thick. It also gives problems with the generalization algorithm. However note that admin_level's on the individual lines are missing in some countries (most notably Poland), so this still requires some work on the data side.

Resolves #2688. Supersedes #2950 (different approach).

@matthijsmelissen
Copy link
Collaborator Author

matthijsmelissen commented Feb 16, 2018

Before:
screen shot 2018-02-16 at 01 33 07
After:
screen shot 2018-02-16 at 01 33 17

Before:
screen shot 2018-02-16 at 01 32 37
After:
screen shot 2018-02-16 at 01 32 25

More screenshots to follow.

@matthijsmelissen
Copy link
Collaborator Author

matthijsmelissen commented Feb 16, 2018

And to illustrate, difference between polygon boundaries and line boundaries.

Polygon (old) / line (new):

screen shot 2018-02-16 at 01 47 10screen shot 2018-02-16 at 01 48 50

Specifying a thinner line in the polygon case doesn't really make the polygon thinner unfortunately.

@matthijsmelissen
Copy link
Collaborator Author

matthijsmelissen commented Feb 16, 2018

@rrzefox Would it be possible to deploy this PR as well? This is an extension of #3065.

@rrzefox
Copy link

rrzefox commented Feb 16, 2018

Yeah I gathered that, but I hadn't read this PR as "ready to be deployed" yet (too many "WIP" in changeset descriptions and even in the title).

This has however now been deployed and Z0-8 rerendered.
Update: now all zoom levels have rerendered

@matthijsmelissen
Copy link
Collaborator Author

matthijsmelissen commented Feb 16, 2018

Thanks a lot! Quite a big change, I really need to get used to it myself.

URL to compare: http://bl.ocks.org/matthijsmelissen/raw/af7a602c222dbf1ff1a2c0d84ed755b7/#7.00/37.519/16.197

@kocio-pl
Copy link
Collaborator

This might be good for checking the borders tagging - and maybe making them more standard to avoid problems like here:

http://bl.ocks.org/matthijsmelissen/raw/af7a602c222dbf1ff1a2c0d84ed755b7/#13.00/16.4752/-90.5431

or here (3 different renderings of the same border - black, blue and none):

http://bl.ocks.org/matthijsmelissen/raw/af7a602c222dbf1ff1a2c0d84ed755b7/#14.00/44.4144/-75.8381

@kocio-pl
Copy link
Collaborator

kocio-pl commented Feb 16, 2018

Korean border (Korean Demilitarized Zone) looks strange now:
http://bl.ocks.org/matthijsmelissen/raw/af7a602c222dbf1ff1a2c0d84ed755b7/#8.00/38.269/-592.085

@Tomasz-W
Copy link

Tomasz-W commented Feb 18, 2018

If this PR includes changing borders on all zoom levels (it's name is "low-zoom levels", but @matthijsmelissen visualisation includes all zoom levels, so I don't know), I've got some remarks:

@andrzej-r
Copy link
Contributor

I quite like the visual aspect of these changes but there are problems.

  • this PR is changing too many things at once. We should have one ticket for discussing/coordinating changes and several PRs implementing specific ideas.
  • proposed rendering of borders and names IMHO looks very good. But screenshots above show a number of technical (mapping?) issues. How do we go about that? Fix mapping issues first? Deploy first and fix errors later (wouldn't recommend that)? Some mitigation techniques?
  • as I mentioned in [WIP] Improve country/state label rendering #3056 I really don't like the idea of using different size labels for regions of the same type. Filtering is fine but rendering style should not misrepresent data.

@kocio-pl
Copy link
Collaborator

@daganzdaanda
Copy link

Hmmm, difficult, and yes, too much in one change really ;)
Apart from the big issue whether it's even possible to switch to lines from polygons for boundaries, here are my 2c.

  • I do like the treatment of naval boundaries.
  • I don't like how close the colours of the labels for countries and cities are now.
  • I like a lot that there are less dashed borders, much calmer. Also, it's no problem for me that the style of a border can change from solid to dashed when zoomed in.
  • Very unsure about introducing generalisation. It opens a can of worms philosophically ;)
  • I really don't mind pink for borders, I think it's used in many maps (e.g. school atlases in Germany). But I agree it's a bit of a issue between motorways and pink borders. The thin dark-green lines mostly look good, but they can be mistaken for railways.
  • Making motorways thinner while leaving the casing / halo makes them look more pink on z6+7

@Zverik
Copy link
Contributor

Zverik commented Feb 24, 2018

I see a lot of gaps in borders. Poland loses all of its regions. Since, I assume, these borders are mapped properly with relations, could it be this PR relies on a secondary, often overlooked mapping practice, like tagging border ways with boundary=administrative?

Can you use a Lua transform to set admin_level on ways propertly from boundary relations?

@imagico
Copy link
Collaborator

imagico commented Feb 24, 2018

I see a lot of gaps in borders. Poland loses all of its regions. Since, I assume, these borders are mapped properly with relations, could it be this PR relies on a secondary, often overlooked mapping practice, like tagging border ways with boundary=administrative?

Correct.

Historically this style has for a long time rendered administrative boundaries both based on way tags and based on boundary relations. This was changed in #1989 to relations only which provides meaningful feedback for mappers that they have correctly mapped the boundary relation - see also #2950 (comment).

This PR would change mapper feedback to communicate to mappers about way tagging only and not about boundary relations. The mapper would essentially directly draw boundary lines. Boundary relations would be used for labels only - which would generate additional confusion for mappers.

If you'd transfer tags from relations to ways you would need to decide if you do this based on tags (i.e. still require boundary=administrative to be tagged on ways) or do this based on relation membership only. In any case you would still loose mapper feedback regarding the validity of the multipolygon geometry.

@hikemaniac
Copy link
Contributor

hikemaniac commented Feb 25, 2018

In general this PR looks good. In my opinion the country and region borders become more recognizable and distinguishable. Also the maritime borders look great. The thinner roads with a halo fit perfectly as well. However, on zoom 8 and bigger I have a hard time to see the borders as they become very similar to railways:
borders unclear
Maybe we can highlight them in some way, though I personally have no good ideas about how to fix this.

@dieterdreist
Copy link

dieterdreist commented Feb 25, 2018 via email

@matthijsmelissen
Copy link
Collaborator Author

with the changed colors and line width the
borders come very close to railways, the small width makes it IMHO more
difficult to distinguish borders from other features, because they are
closer now.

Does your criticism apply to all zoom levels or only the mid/higher ones?

@Tomasz-W
Copy link

I think this issue should be split into few parts, and in the part with borders colour change, we should start from changing current borders color to dark-green, and discuss about certain problems one by one. It's big topic by itself, so with another things (labels change, highways visibility) the disscusion it messed up too much.

@matthijsmelissen
Copy link
Collaborator Author

matthijsmelissen commented Mar 4, 2018

I'm still playing with this. Example of what I have now:

Before:
screen shot 2018-03-04 at 23 10 22

After:
screen shot 2018-03-04 at 23 09 08

I'll cut this up into smaller PR's.

@kocio-pl
Copy link
Collaborator

kocio-pl commented Mar 4, 2018

If I see it right, the land color has been changed for something yellow, or this is a kind of bug?

@matthijsmelissen
Copy link
Collaborator Author

If I see it right, the land color has been changed for something yellow, or this is a kind of bug?

Yes, that's something I've been experimenting yet (for z0-7). It increases the contrast between land/water and land/roads, and to me makes the map more pleasant to look at. Not sure yet whether I'll keep it though.

@matthijsmelissen
Copy link
Collaborator Author

I remember somebody had a link that shows the admin ways that do not have an admin_level tag. Could somebody repost that link?

@Tomasz-W
Copy link

Tomasz-W commented Mar 5, 2018

I don't like yellow background idea. For me, @imagico low-zoom proposition is way more better direction.

http://maps.imagico.de/#map=3/38.411/2.988&lang=en&r=osmlz&o=146&ui=2

@matthijsmelissen
Copy link
Collaborator Author

For me, @imagico low-zoom proposition is way more better direction.

Which of the layers? Note that the Green Marble layer is not osm-data, so we probably don't want to use it here.

@Tomasz-W
Copy link

Tomasz-W commented Mar 5, 2018

Which of the layers?

The ones set in link (OSM-Carto style landcover, OSM-Carto style water areas). I like Green Marble, because it's giving an effect like everything is complete :)

@matthijsmelissen
Copy link
Collaborator Author

I like Green Marble, because it's giving an effect like everything is complete :)

I agree that it looks nice, but of course the question is whether we want to give the impression on openstreetmap.org that everything is complete :).

@kocio-pl
Copy link
Collaborator

kocio-pl commented Mar 5, 2018

This is more realistic version which shows only the data we already have:

http://maps.imagico.de/#map=3/38.411/2.988&lang=en&r=osmlz&o=56&ui=2

This model however doesn't use desaturation we use on midzoom, so the colors would be softer (that would probably help Japan for example). IIRC Green Marble was used by Christoph only to show how the final effect could look like:

http://blog.imagico.de/on-basic-small-scale-landcover-rendering/

The bare land will be still visible on low zoom levels for quite a long time and I like the current color (yellow/green doesn't work for me).

@polarbearing
Copy link
Contributor

On a technical level, admin borders are now rendered from the individual lines rather than polygons.

I am strongly against this move as it completely breaks the data model of boundary relations.
I was surprised to find a major change in how to handle border data - woken up by the tagging discussion - camouflaged in a PR that is named for some visual improvements. As said by others before, these moves need to be discussed separately.

math1985 added 16 commits March 30, 2018 00:05
* Admin rendering based on lines instead of relatinos does not work (lack of
  data in e.g. Poland, and ugly rendering of dashes in case of short sections).
  Instead, this renders maritime borders based on lines, on top of the full
  border based on the polygon.
* Fix error on high zoom levels.
* Render maritime border slightly darker.
@matthijsmelissen
Copy link
Collaborator Author

matthijsmelissen commented Apr 12, 2018

Some more ideas for border rendering (first is current):

  1. screen shot 2018-04-12 at 02 20 59
  2. screen shot 2018-04-12 at 02 21 14
  3. screen shot 2018-04-12 at 02 21 40
  4. screen shot 2018-04-12 at 02 24 17

@dieterdreist
Copy link

dieterdreist commented Apr 12, 2018 via email

@Tomasz-W
Copy link

Tomasz-W commented Apr 12, 2018

Proposition from #3074 (comment) was perfect for me. Bold, well-readable country names and well-visible borders in gray, which was distinguishing them from pink roads.

@dieterdreist
Copy link

dieterdreist commented Apr 12, 2018 via email

@matthijsmelissen
Copy link
Collaborator Author

matthijsmelissen commented Apr 12, 2018

Proposition from #3074 (comment) was perfect for me.

For the record, the same area/zoom level with that proposition:

  1. screen shot 2018-04-12 at 11 22 14

@kocio-pl
Copy link
Collaborator

It would help me if you add numbers to the proposed versions.

@matthijsmelissen
Copy link
Collaborator Author

Done!

@kocio-pl
Copy link
Collaborator

I like 3 and 5 is also acceptable, however I'm not used to it.

@matthijsmelissen
Copy link
Collaborator Author

I'm a bit stuck with improving the low-zoom levels further. In my opinion zoom levels 5/6/7 are still rather ugly, however I find it hard to really improve them.

Is anyone willing to write a PR with suggestions?

@kocio-pl
Copy link
Collaborator

kocio-pl commented May 7, 2018

I'm stuck with #2946, but I lack the proposition how to solve it, mainly from @matkoniecz.

Another thing for low zoom that depends on the problem beyond me is showing rivers using waterway relation properties - see osm2pgsql-dev/osm2pgsql#230 (comment).

I'm not sure what else could I do at the moment.

@matthijsmelissen
Copy link
Collaborator Author

Some of the issues in this PR have been addressed already; others will hopefully be addressed in separate PRs. I am therefore going to close this meta-PR.

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

Successfully merging this pull request may close these issues.

None yet