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

Adjust aerodrome zoom levels #3879

Merged
merged 3 commits into from
Sep 20, 2019
Merged

Conversation

jeisenbe
Copy link
Collaborator

@jeisenbe jeisenbe commented Sep 9, 2019

Adjust aerodrome and airport zoom levels

Fixes #2664 and fixes #3809
Related to issues #1028 and #1143
Follow-up of PR #2674, replaces closed PR #3856

Changes proposed in this pull request:

1) For airports (aeroway=aerodromes with iata=* and icao=*, and not access=private)

  • Move initial zoom level for text for airports from z10 to z11. The Icon continues to render from z10
  • Continue rendering icon and text until z16, but stop rendering large areas earlier (when way_pixels > 192,000)

2) For other aerodromes (aeroway=aerodromes lacking iata=*, icao=* or both, or with access=private)

  • Increase icon initial zoom level from z11 to z12
  • Move initial text label zoom level from z11 to z13.
  • Continue rendering till z17, or until way_pixels > 192,000 if mapped as an area.

Explanation

The current initial and final zoom levels for aeroways are z10 and z13. This appears to have been picked to work with large, international airports in the high lattitudes, though even there it's surprising that airports are not rendered at z14.

In #2664 and #3809 it is noted that aerodrome icons and labels disappear after z13, much sooner than almost any other feature.

Also, in #1143 it was noted that too many small aerodromes were previously shown at mid-zoom levels, (z10 to z12). This was partially address in PR #2674 by moving aerodromes with access=private or lacking iata= (or icao=) to z11

Another issue is that the text label or icon of an airport is often blocked by the name of the town at low zoom levels (z10 to z12), leading to just the text label or just the icon showing. This is particularly a problem for small airfields and airstrips, which show a zoom level before place=village currently, though they area usually less significant.

Recently, issue #1028 was solved by stopping area labels based on waypixels for most area features at way_pixels > 768,000

Many larger airports are now mapped as areas, but of the 100 aerodromes with an IATA and ICAO code in Germany there are still 11 mapped as nodes, and in Canada there are 78 nodes out of 260, so it's not possible to rely on way_pixels entirely. However, it might be used to stop rendering large airports a sooner than others

By changing airports (those with IATA codes, which are required for any airport that has commercial airline flights) to show only the icon at z10, the feature is not too dominating on the map at this zoom level. At z11 larger airports are clearly visible and the text label is not too distracting (though it still may be a problem near the equator).

For aerodromes without IATA codes, the initial zoom level is changed from z11 to z12, and only the icon is shown at this zoom level, with the text label first shown at z13. This allows place=village to be shown 1 zoom level before these minor features have labels.

The final zoom level is changed to z16 for aerodromes with an IATA code and z17 without, based on the usual size of these two categories. Some large aerodromes at high latitudes will not benefit from the icon and text label rendering at z16; this is solved by checking for way_pixels < 192,000.

The way_pixels limit is one zoom level lower than for landcover (which uses 768,000), because airports are often significantly longer than they are wide, and because the text size is not increased with way_pixels as with landcover text labels.

Often this prevents rendering of large international airports below z14 or z15 in northern Europe, and z15 or z16 near the equator.

Change initial zoom level to z11 for airports, z13 for minor aerodromes, change last zoom level to <17 or waypixels<768000
Airport z10-17 icon z11-17 text, minor aerodrome z12-18 icon z13-18 text, and waypixels <768000
Final zoom level z15 for airports with IATA code, z16 for other aerodromes, or if `way_pixels > 192000`
@jeisenbe
Copy link
Collaborator Author

jeisenbe commented Sep 9, 2019

Bremen Flughaven, after:

z13 (unchanged)

z13-flughafen-bremen-after-same

z14 after (previously did not render)

z14-flughafen-bremen-after

Does not render at z15, because way_pixels = 300,000 at z15 (75,000 at z14)

@jeisenbe
Copy link
Collaborator Author

jeisenbe commented Sep 9, 2019

Papua, Indonesia

https://www.openstreetmap.org/#map=10/-4.000/139.000

z10 before

z10-bandar-udara-baliem-valley
after
z10-baliem-valley-airports-after

z11 before / after (same)

  • Currently this is the highest zoom level where the airport name is shown. Icon is blocked by collision with city name
    z11-bandar-udara-wamena-only-z-level-with-label

z13 Before / After (same)

  • Last zoom level with icon rendered; text label still blocked by collision with secondary highway
    z13-bandar-udara-wamena-symbol-last

z14 Before

z14-bandar-udara-wamena-no-symbol
After
z14-wamena-airport-after

z15 AFTER

z15-wamena-airport-after

z16 after

  • way_pixels = 108k - would not render at z17
    z16-wamena-airport-after

@jeisenbe
Copy link
Collaborator Author

jeisenbe commented Sep 9, 2019

Redding, California

z11 before

z11-redding-airport-before
z11 after
z11-redding-airports-after

z12 before

z12-redding-airports-before
z12 after
z12-redding-airports-after

z14 AFTER - Benton field

  • not rendered before
    z14-redding-benton-field-after

z15 AFTER - Sky Ranch

  • not rendered before
    z15-redding-sky-ranch-after

@imagico
Copy link
Collaborator

imagico commented Sep 9, 2019

Not having tested this yet but at a quick glance it looks good.

I still have concerns that in a lot of cases there will at z15+ be collisions between the airport symbol/label and runway/taxiway and other road labels on the airport leading to random appearance/disappearance of the symbol/label that could be confusing.

The Wamena example shows a 'near miss' in that regard - i suspect there are quite a lot of cases where this is a hit and the symbol is not shown at z15 but turns up again at some later zoom level.

@jeisenbe
Copy link
Collaborator Author

jeisenbe commented Sep 10, 2019

collisions between the airport symbol/label and runway/taxiway and other road labels leading to ... symbol is not shown at z15 but turns up again at some later zoom level

This does not happen because amenity-points icons are rendered before roads-text-ref. And usually the runway or taxiway ref will still render because text-placement: line so the label can move. Sometimes the aerodrome text label is blocked by the runway ref, however, since roads-text-ref is before text-points.

But this is a problem with many other features, including important ones like hospitals and places of worship, where the icon may appear at z16 and then be blocked by less important features at z17 or z18. I thought we had an open issue about this problem? #964 and #1026 are related, and I know you've mentioned it before in #3635 (comment) - perhaps there should be a more specific issue opened, so we can discuss how to tie initial zoom level to rendering priority for icons and text labels?

(The specific issues of runway/taxiway ref blocking the aerodrome text label could be solved by moving runway and taxiway refs to roads-text-ref-minor - as I wanted to do in #3709 - and then moving roads-text-ref-minor after text-poly, text-line and text-point - but it would be better to solve the more general problem of issue #234.)

@imagico
Copy link
Collaborator

imagico commented Sep 10, 2019

But this is a problem with many other features, including important ones like hospitals and places of worship, where the icon may appear at z16 and then be blocked by less important features at z17 or z18.

Yes, but there mostly the POIs compete with each other and this is a problem of lack of consistent prioritization among them. At z16 most of the other potentially blocking things are already shown. With airports the symbols start at z10-z12 and most higher priority labels start at z15.

Copy link
Collaborator

@imagico imagico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work as described. I'd say lets try this.

@jeisenbe
Copy link
Collaborator Author

Thanks. I'll merge this in a couple of days if there are no other comments or objections.

@jeisenbe jeisenbe merged commit e3b7dd1 into gravitystorm:master Sep 20, 2019
@jeisenbe jeisenbe deleted the aerodrome-zoom branch September 20, 2019 04:08
@jeisenbe
Copy link
Collaborator Author

Merged

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