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

switch admin entity rendering to using polygons #1929

Closed
wants to merge 1 commit into from

Conversation

nebulon42
Copy link
Contributor

I'd like to switch the rendering of admin entities from lines to polygons. This is partly to unify it with admin name rendering (and others such as nature reserve boundaries), which already use polygons and to improve the mapper feedback loop. By using polygons it is easier to spot errors as broken geometries will not show up on the map. That also means that the map will often have some missing countries/states etc.

I'm assuming that we don't think it is desirable to render lines of incomplete admin entities and that we don't want to have the most complete but the most correct map.

Here is a preview of how the omission of broken geometries would look like (France and Belgium), apart from that rendering is unchanged:

france_belgium_missing

@imagico
Copy link
Collaborator

imagico commented Oct 30, 2015

The problem with mapper feedback here is that the low zooms (where the boundaries are most visible) are only re-rendered occasionally and if boundaries are broken during that time they will stay broken until a re-render is triggered. So while in principle i think this is a very good idea it will probably not have quite the effect you hope for. We have the same effect with the coastline although there we have mechanisms in place that prevent a coastline update from being deployed that contains larger errors.

@nebulon42
Copy link
Contributor Author

Yes, I thought about that, a valid concern. As I don't know how much is usually broken on the country level I'm undecided on how much of a problem that would be.

@jojo4u
Copy link

jojo4u commented Oct 30, 2015

What does this mean from a OSM element point of view? Only boundaries which are mapped as relations are rendered?

@nebulon42
Copy link
Contributor Author

Yes, only relations with valid geometry (i.e. closed rings) will get rendered. But this is the case for all admin labels already.

@jojo4u
Copy link

jojo4u commented Oct 30, 2015

Reading http://wiki.openstreetmap.org/wiki/Osm2pgsql/schema I understand that polygons include closed rings by relations and by closed ways?

@nebulon42
Copy link
Contributor Author

Seems reasonable, but I cannot confirm. Anyway, I guess that admin entities consisting out of only one closed way will be in the vast minority.

@matthijsmelissen
Copy link
Collaborator

@tomhughes Any opinion from your side perhaps? How often are the low zoom levels rendered again? Sorry I always forget.

@pnorman
Copy link
Collaborator

pnorman commented Oct 30, 2015

@tomhughes Any opinion from your side perhaps? How often are the low zoom levels rendered again? Sorry I always forget.

monthly, and with any style changes

@nebulon42
Copy link
Contributor Author

For context and/or impact it is also worth looking at #713 and #1141. After doing that there is a question left open for me: When do closed ways (not in a relation) end up in planet_osm_polygon?

@pnorman
Copy link
Collaborator

pnorman commented Oct 31, 2015

When do closed ways (not in a relation) end up in planet_osm_polygon?

When they have a tag that is a polygon tag, as defined in the .style file being used. See default.style documentation

@nebulon42
Copy link
Contributor Author

Thanks for clarifying. That means because of openstreetmap-carto.style#L18 we would lose boundaries that are closed ways but not in a relation unless they have area=yes. I would now have to investigate how many that would be.

@pnorman
Copy link
Collaborator

pnorman commented Oct 31, 2015

A boundary that is a closed way won't have a type=boundary tag, and is different from a relation with type=boundary.

See tagtransform.cpp

@matthijsmelissen
Copy link
Collaborator

There is a very diligent group of mappers in the German forum that tries to keep the admin boundaries correct: http://forum.openstreetmap.org/viewtopic.php?id=29724&p=34
Could somebody perhaps ask for the opinion of the people in that topic? I suppose they'll have a good feeling for how often the country boundaries break.

@nebulon42
Copy link
Contributor Author

I already did: http://forum.openstreetmap.org/viewtopic.php?pid=558253#p558253
Answer: http://forum.openstreetmap.org/viewtopic.php?pid=559042#p559042

Summary: He cannot confirm that a lot of level 2 boundaries are broken at the same time. All 2-3 days there is one level 2 border broken or two countries where the problem lies at their adjacent boundary. He also advised me to check the history, but I didn't do so yet.

@matthijsmelissen
Copy link
Collaborator

Thanks. So based on this data, we can expect that once every three months, one or two countries will be rendered without admin boundary for a month long. Is that something we're willing to accept?

@imagico
Copy link
Collaborator

imagico commented Dec 1, 2015

That is the optimistic version, the pessimistic would be: about half of the time there is a serious error shown in the map that will persist for a month even after it has long been fixed.

I am not saying this is necessarily a deal breaker but it probably does not help to be too optimistic about it.

The alternative would be a preprocessing solution - which would have to be sufficiently robust w.r.t. errors as well of course.

@nebulon42
Copy link
Contributor Author

I now also think that an error would stay too long even if it was fixed. I also think that something in the schema has to be changed to handle admin boundaries properly. Maybe we should defer this PR.

@mboeringa
Copy link

That is the optimistic version, the pessimistic would be: about half of the time there is a serious error shown in the map that will persist for a month even after it has long been fixed.

It is likely though, that people will be even more diligent in fixing these issues, if they appear on the main map, so chances are, things get fixed quicker.

Another unanswered question is, with the OSMF funding goal well reached and new hardware probably ordered, if the 1 month cycle could not be reduced to a more acceptable once a week?

@HolgerJeromin
Copy link
Contributor

Some mapper could say:
"oh, yes. osm carto is constantly buggy about the boundary. (the maintaining guys are idiots, the map was way better a few years ago). I fixed once the admin boundary, but the map was not fixed in time. So i stopped fixing them, as i do not see the result"

@nebulon42
Copy link
Contributor Author

(the maintaining guys are idiots, the map was way better a few years ago)

Replace maintaining guys with devs and I read that (essentially) all the time after a new release. So that wouldn't change much. :-)

@matthijsmelissen
Copy link
Collaborator

Maybe we should defer this PR.

I think I agree. I like the proposal, and I would love to be able to accept this, but I think with the slow update cycle for low-zoom tiles, this will lead too often to noticeable rendering problems.

@nebulon42 nebulon42 deleted the admin-polygons branch February 9, 2016 17:41
@pnorman
Copy link
Collaborator

pnorman commented Apr 1, 2016

Using polygons only would also cause problems with use of extracts where it's not always possible to compose a complete polygon

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.

7 participants