-
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
Showing natural areas on z5+ #3458
Conversation
Kocio-pl,
1. do you want to include wetland_mangrove, wetland_marsh etc? I didn’t see
them in the changes. Mangroves are particularly large areas in the tropics.
2. Why isn’t the farmland showing up in the center of California? And along
the Nile in Wgypt
Is the waypixels limit too small? Lots of the farms there are 1 square mile
(2.2 square kilometer) so its strange that they don’t show up.
3. Should we show natural parks and nature reserves too? In the USA the
land in national forests and national parks is not usually tagged with
landuse=forest
-Joseph
…On Thu, Oct 18, 2018 at 7:21 AM kocio-pl ***@***.***> wrote:
*California, USA*
z5
[image: nmxpmkaz]
<https://user-images.githubusercontent.com/5439713/47119545-8933b100-d26b-11e8-993f-d65f7e1ae5a0.png>
z6
[image: 4j2eavvj]
<https://user-images.githubusercontent.com/5439713/47119548-8c2ea180-d26b-11e8-9617-00f61dbc5234.png>
z7
[image: qpxu yzy]
<https://user-images.githubusercontent.com/5439713/47119554-8f299200-d26b-11e8-9e21-f1b10ca018b4.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3458 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AoxshCNigGhAHM2c9Olr0hTqIwpNvV5_ks5ul61agaJpZM4Xo4vW>
.
|
Thanks for your reaction! I will try to look and answer all your questions, it's very helpful for me to discuss specific problems.
I have tuned two more of them, but this is just for showing their background. As far as I can tell looking at the code, their particular symbols are rendered on z14+, and generic wetland pattern is already being rendered on z5+: [int_wetland != null][zoom >= 5] {
polygon-pattern-file: url('symbols/wetland.png');
polygon-pattern-alignment: global;
}
I have a problem with finding biggest areas of a given type in some area, which would be very handy for testing low zoom features. Maybe someone familiar with SQL could paste here some script I could use? On low zoom there is much harder to find visible examples than on medium and high zoom levels, simply because typically there are only few of them. For example mangroves look like being very common in Cuba: but this tool is not suitable for tuning low zoom rendering. There might be just a lot of small ones, since even on z7 there are no big wetland/mangrove areas except this swamp (click to see the full size image): |
I added some big mangroves in southwestern New Guinea about 1 or 2 months ago at 137° 30' 34.5"E, 5° 04' 04.9"S, the biggest is about 20km x 20km. But perhaps all the coastline and rivers will make it hard to see at z7? If all the wetland areas are rendering the same, then it's fine. |
We have z8+ for that. Natural parks and nature reserves are virtual borders for some kind of nature area, but this can be very different, not necessarily forest or only on some part of that (like here). They have a green shadow inside just as a hint to make the area more visible, but this is not a substitute for proper tagging features inside. Here is the example of reserves with and without real tagging of features (when you zoom in, the green shade goes away, so it's easy to see if the tagging is complete): |
Low zoom areas in French fork are pre-rendered into one big (80 MB) TIFF file, which is then used as a data layer: https://github.com/cquest/osmfr-cartocss/blob/master/get-layers.sh https://github.com/cquest/osmfr-cartocss/blob/d6dc2a652fa6331d8a77ca11b8e563bd57539c13/osmfr.yml#L84 @cquest Could you tell how |
It might make sense to partially revert #2874 only for low zoom data layer. When I changed AND way_area > 1*!pixel_width!::real*!pixel_height!::real to be 0.01 instead of 1 again, I got following results: z7 before (1) z7 after (0.01) z7 difference ( |
@jeisenbe thanks for looking out for California ;) @kocio-pl, I've been meaning to do an issue about Orchards being rendered at higher zoom levels. There's pretty large areas of them in California. Although a lot of lot them are mapped as small individual plots, but if they could be added anyway, that would be great. Otherwise, there's going to be pretty large gabs with the map in California. |
I’d recommend rendering orchards and vineyards the same as farmland at low
zoom level, because they are all types of agricultural land.
…On Thu, Oct 18, 2018 at 1:55 PM Adamant36 ***@***.***> wrote:
@jeisenbe <https://github.com/jeisenbe> thanks for looking out for
California ;)
@kocio-pl <https://github.com/kocio-pl>, I've been meaning to do an issue
about Orchards being rendered at higher zoom levels. There's pretty large
areas of them in California. Although a lot of lot them are mapped as small
individual plots, but if they could be added anyway, that would be great.
Otherwise, there's going to be pretty large gabs with the map in California.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3458 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AoxshKDh_g-Weai9039-04rFoja2b6l8ks5umAnKgaJpZM4Xo4vW>
.
|
It would definitely look better that way. I don't think the pattern on either one of them would work at higher zoom levels and the darker green of orchards might be confused for woods or something. |
@kocio-pl Thanks for working on it! But I think it's way too light on z5, so I propose to test 2 other variants:
|
I want this code to be very limited in scope. Low zoom is very specific and we have no big expertise on that, because most of our work focuses on high zoom levels (and occasionally medium ones). Some interesting features of low zoom levels to consider:
What I want to do here is to find which objects make so big areas/clusters that would be visible on z5-z7 and make sure that performance is still acceptable. Which is quite contradicting - more objects and more (sub-pixel) accuracy create more pleasing image with less gaps, but at the same time we may end up reading tons of data which appear only in 2-3 places as a small visual patch, but eating all the server resources for hours. Changing colors and tuning opacity is a valid issue, but this can be done once we have some solid knowledge what's going on. It's better to have faded colors and make them stronger later if needed than to create visual mess, so thanks to #2654 we're on the safe side now. |
Fresno in California looks better with vineyards and orchards added (z9): Before After |
California with vineyards, orchards and scrub using 0.01 px filter - z7 and z10 rendering (rescaled to match z7 rendering size with simply z7 z10 rescaled |
I believe the problem is that low zoom background image used in French fork is outdated, so our take is OK - this is current state of data. When you zoom in from z7 into z8 you will see the differences near Fresno (forest appears and part of farmland disappears): z7 (low zoom preprocessed data from image file) z8 (current data) |
@rrzefox Could you apply this patch on your server? I'm especially interested in performance comparison for reredering z5-z9 in 3 cases:
Since this is a low zoom area this should be pretty deterministic and we will have data for all the tiles, not just some of them (this is the upside of testing low zoom levels). |
I try to measure performance using current Europe data, because @Komzpa server he offered for testing has not enough disc space for the whole planet and Europe still makes about half of all OSM data (it takes 447 GB in PostgreSQL), so it should be enough to get proper idea about the speed. I run https://launchpad.net/~osmadmins/+archive/ubuntu/ppa?field.series_filter=bionic and it's included in package https://github.com/openstreetmap/mod_tile I guess this is the source of this application: https://github.com/openstreetmap/mod_tile/blob/master/src/speedtest.cpp Could anybody tell me if this test will give proper results? |
Initial batch - I had to halt the test after 2h, because it was eating almost full swap (RAM is 32 GB and swap is another 32 GB there):
|
Second batch (cold reboot of renderd and postgresql):
|
How does this compare with before? |
I just started with "after" (since this might be the worst case) - now starting third batch. Then I will test "before", also 3 times, so still many hours of testing ahead. |
3rd batch with 0.01 px limit (after cold reboot):
|
First batch with 1 px - faster, but looks like this is still in the same range, which is good:
|
Second batch with 1 px:
|
e755e4d
to
ca3458c
Compare
This code does some basic things, precisely shows some natural areas earlier. How should they look like however is a different question, which is related to the recent ticket #3513. Also any gamma tuning should be researched later. In this code I have decreased military minzoom from z7 to z8 - it's not directly related to natural areas, but it's a performance fix, which can make the problem of rendering more elements on low zoom less resource hungry. |
Has this change been approved by another maintainer? I think this vhange has both advantages and disadvantages, and would need more careful consideration. Unfortunately myself I’m in the middle of moving houses myself, and don’t have a lot of spare time at the moment. |
I was waiting for comments as usual and there was only one simple question from you, so I'm surprised that you haven't even mentioned about possible disadvantages before. |
Sorry, I was probably not clear enough - nothing is changed with rendering military areas. The database is currently being asked about military data on z7, but nothing is rendered there, so it was just a fix for hidden database abuse.
It's just a step toward low zoom improvements (https://github.com/gravitystorm/openstreetmap-carto/projects/4), however we have some guidelines already: https://github.com/gravitystorm/openstreetmap-carto/blob/master/USECASES.md
Yes, the proper thread is here: #2436. In short - it would be better, but we need more active developers with real merging rights willing to peer review the code. Currently these are mostly 2 different groups, but I hope new developers can get "collaborator" status eventually or some old developers will start making reviews again. |
This PR looks good to me |
@kocio-pl Thanks! Now I'm looking forward to natural areas on z0-z4 & changing borders colour :) |
Z9 was quite anomaly in terms of rendering time. It was taking much longer than Z8 and Z10 during pre-computation. Dominant layer was landuse_gen0. It was using subpixel rendering for landuse, which is useful at very low zoom but seems to be safely discardable at Z9. See as well gravitystorm/openstreetmap-carto#2874 and gravitystorm/openstreetmap-carto#3458 (comment). See #644.
Z9 was quite anomaly in terms of rendering time. It was taking much longer than Z8 and Z10 during pre-computation. Dominant layer was landuse_gen0. It was using subpixel rendering for landuse, which is useful at very low zoom but seems to be safely discardable at Z9. Also add checks between way geometries and bbox to ensure correct usage of geospatial indexes in db. See as well gravitystorm/openstreetmap-carto#2874 and gravitystorm/openstreetmap-carto#3458 (comment). See #644.
Related to #2688
Implements parts of https://github.com/gravitystorm/openstreetmap-carto/blob/master/USECASES.md
Changes proposed in this pull request:
Examples (click on images to see the full size):
Poland
z5
z6
z7
Egypt
z5
z6
z7