-
Notifications
You must be signed in to change notification settings - Fork 819
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
do not display borders between national parks on lower zoom levels #2199
Comments
part of #2194 |
One important thing that is missing: currently with any displayable nr all, also small nr are displayed. This is obviously unwanted. At the same time filtering in subquery would have a different poor result - large area made of many small joining protected areas would not be displayed. |
Now I see that
is missing in the new query, adding it back should partially solve problem of displaying too small PR. |
sent from a phone
I don't think the result is necessarily bad, it depends which information you want to get from the map. If actual borders are like this I think it's good to show these rather than make a cleaner looking less accurate picture by hiding the complex reality |
I like the results, but performance is potentially a big issue, and one that you won't see unless you have a full planet DB. Are there any potential clever Mapnik tricks that would avoid the need to do this in SQL? I'll sit down and have a good think about ways to do this. |
Yes, for map about national park structure it would be unwanted. But currently such borders are dominating everything else - rivers, roads. In many regions it crosses point where adding more data means that one gets less information.
I may be mistaken but this query should be about equally (in)efficient in full planet and simplified osm2pgsql database dump? It querries and processes only Pulling polygons from planet_osm_polygon that match protected area tags will take slightly longer in database with additional polygons - but that part is done now anyway. I considered putting And on simplified osm2pgsql database dump database zoom 7 worked. Performance penalty was not large enough to notice without checking rendering time logs. And
I thought about doing similar trick to borders (#1107) draw big polygon, slightly larger than NR, then erase polygon of NR size. It should leave border around nature reserves, without borders between them. I never investigated it further (maybe I am missing something that makes it impossible) as it would falsely make protected areas larger on map than in the reality. |
sent from a phone
I thought this was intentional, we show them very early as one of the few things in low medium zoom levels. Btw, there is some inconsistency, e.g. here: http://www.openstreetmap.org/#map=8/44.941/12.313 |
It is because labels for towns appear later than the national park label but with higher priority. I am unsure is it worth changing. |
sent from a phone
yes, this is the perceived inconsistency: first you see national park labels where towns are not displayed yet, and when these minor towns are displayed at higher zoom levels they have a higher priority than the np labels. |
I agree that showing large protected areas makes sense. I see no point in displaying detailed legal structure of protected areas too early. |
I thought about how size of nature reserves after joining them may be calculated
|
ST_Area is in projected units.
The problem is the ST_Dump. ST_ClusterIntersecting has a bad API for this and is 2.2 or later only. ST_ClusterDBSCAN has a better API and I could easily write a query that does this, but that is 2.3-dev only. |
Thanks for the info!
What about such query? It is ugly, but it works.
|
Don't return a name or boundary column at all. To see if Do we want to handle almost-connected national parks where a railway or road cuts a small line in them? |
I think it looks promising but am somewhat irritated because in the past one of the goals in further development of this style was reducing/limiting complexity and this change will likely add significant complexity to the code. |
What is our current view on the subject? With proposed rendering for boundary=protected_area (#603) I plan to implement soon, there will be more of such borders. On the other hand:
|
In some regions there are multiple joining national parks. Western USA is the most impressive, with many protected areas covering significant area with byzantine shapes and topology.
For example in this area where national park borders seems to be drawn by Elbridge Gerry everything is anyway inside a protected area.
As result both on high and low zoom levels is quite bad.
This is not limited to the USA. For example - http://www.openstreetmap.org/#map=7/48.247/24.587 is area where Slovenia, Ukraine and Poland have five joining protected areas.
Note that many joining national parks are curently badly mapped as not joined, so there are some rendering artefacts caused by poor tagging. This effect is welcome rather than a problem but it makes testing harder.
http://www.openstreetmap.org/#map=17/52.57878/14.63135
On higher zoom levels it makes sense to display borders also between joining protected areas, it is open question what should be choosen as threshold (currently in proof of concept all joining borders are eliminated).
I developed it as part of a more complex change, but it stands well also on its own.
I submit it as a issue, not PR as I have only a proof of concept. SQL query is partially a massive HACK/TODO and there are some suspicious rendering articacts (I submitting it anyway, as after days of battling with pg_hba.conf, qgis etc it finally works)).
My code used to generate before/after below is at matkoniecz@3f05be3 (updated code is at https://github.com/gravitystorm/openstreetmap-carto/compare/master...matkoniecz:dissolve_national_parks_proof_of_concept?expand=1)
I will now look for way to correctly compute way_pixels (in case that it is obvious for somebody - comments/hints are welcomed).
In regions like UK with sensible structure of protected areas it should have no noticeable change.
There are some negatives effects - obviously it hides some data about structure of protected areas and is a performance hit.
before/after
here tagging mistakes ale clearly visible:
https://cloud.githubusercontent.com/assets/899988/16359316/b3aaaec8-3b2f-11e6-8b25-3ca418feeb44.png
The text was updated successfully, but these errors were encountered: