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

Reenable basic glacier rendering in Antarctica #646

Closed
wants to merge 4 commits into from

Conversation

imagico
Copy link
Collaborator

@imagico imagico commented Jun 18, 2014

This change re-enables basic rendering of the glacier coverage of Antarctica which got lost after the continent size glacier multipolygon was removed with last years imports. This implements the first point in the suggestion list on http://wiki.openstreetmap.org/wiki/Polar_Regions_Rendering_Issues, see also #191.

Since apparently it is not possible to limit the extent of shapefile layers in the style (likely either a carto or mapnik limitation) this is done by splitting the shapefiles in preprocessing using ogr2ogr. Unfortunately this change will therefore require further modifications on the render servers for deployment.

Other than with normal glacier rendering there is no outline drawn since this will only cause problems if additional landcover features are rendered in the future.

This change itself brings only a subtle improvement in the map appearance, it is however prerequisite for any further improvements of antarctic rendering, like in imagico/osm-carto-alternative-colors@9b0bd2a as shown in the following examples:

glacier rendering example 1
glacier rendering example 2
glacier rendering example 3

@pnorman
Copy link
Collaborator

pnorman commented Jun 26, 2014

👎 to federating styles at this time or implying parts of the map not in any areas except for land are anything.

@imagico
Copy link
Collaborator Author

imagico commented Jun 26, 2014

I do not quite understand the comment, maybe you can rephrase it.

The visual effect of this change are very basic, it just restores something that was previously already in the map but got lost due to a change in the way things are mapped. The images shown might be misleading, they are meant as a lookout what can be done based on this change in the future.

The only real visual change is that the Antarctic ice sheet would show up on zoom>=1 already while it previously only showed on zoom>=6 like the other glaciers. If this is deemed inconsistent it would be equally possible to show the Greenland ice sheet early as well (based on way_area) or keep it all limited to zoom>=6 (much worse but better than nothing).

@imagico
Copy link
Collaborator Author

imagico commented Jul 10, 2014

Changed this to treat the Greenland ice sheet the same so results are globally consistent. The distinction in rendering is in line with the common classification of land ice into ice sheets and smaller glaciers. The former start showing up at z=2 now (could be changed easily of course) without outlining so appearance is subtle, the rest as before at z=6. Here a few examples showing the results of this change:

z=2
z=5
z=6

Performance of rendering at z<6 might suffer somewhat of course by rendering a large non-simplified polygon at these scales.

@matkoniecz
Copy link
Contributor

I like results (IMHO other large scale areas like deserts and forests should render up to lowe zoom levels) and I hope that performance will not be a problem.

@matthijsmelissen
Copy link
Collaborator

I'm on two minds about this. On the one hand, I think it does look nice. On the other hand, I think we should decide whether the low-zoom map is a political or geographical map - on a geographical map, landuse does not really have a place.

@matkoniecz
Copy link
Contributor

I would prefer geographical map, with marked borders.

@imagico
Copy link
Collaborator Author

imagico commented Jul 10, 2014

@math1985 - i understand this and would be fine with starting all at z=6 (which would make the last commit unnecessary) although i personally think this would be unfortunate.

Please note that glaciers are very different from a normal landcover/landuse - they are much more like water and you do show the coastlines on any map (in OSM also all lakes > 70000km^2). When you look at the earth from far away the most striking surface feature is the land-ocean distinction but without much doubt the second most distinct feature are the ice sheets. You could even say the earth surface divides into three primary surface classes - land, liquid water and ice. Therefore i think showing the ice sheets early is in no way a commitment to also show other natural features at lower zoom levels.

@matthijsmelissen
Copy link
Collaborator

A decision from @gravitystorm is needed for this PR.

@pnorman
Copy link
Collaborator

pnorman commented Aug 2, 2014

I do not quite understand the comment, maybe you can rephrase it.

You are special casing part of the world in terms of specifying different styles there than the rest of the world, which is why I'm 👎 on it.

@imagico
Copy link
Collaborator Author

imagico commented Aug 2, 2014

@pnorman - technically this is right. As i however explained plenty this is due to the way things are mapped, a decision that has received broad support when it was made. You could revisit that decision but this is really lacking good alternatives.

Cartographically this change fixes a major fault in the style, IMO the most blatant one there is. I am open to more elegant ways to do this, moving the coastline data from shapefile to spatialite format might be better if that allows querying subsets without external processing (not sure, never used spatialite on mapnik before). I guess you could also put them into postgis although this is likely not very efficient with the daily updates. I opted for the simplest solution i saw within the current system.

Formally it could be avoided to spatially differentiate in the style by externally merging the coastlines south of -60 degrees with the Greenland ice sheet multipolygon into a shapefile and using that in the style but this would be unnecessary processing (the Greenland ice sheet is already in the postgis db) and it would require additional maintenance work. I don't think this would be a good idea.

@pnorman
Copy link
Collaborator

pnorman commented Aug 2, 2014

am open to more elegant ways to do this, moving the coastline data from shapefile to spatialite format might be better if that allows querying subsets without external processing (not sure, never used spatialite on mapnik before).

The problem is querying a subset based on geography, aside from the automatic !bbox! condiion added as part of rendering.

@imagico
Copy link
Collaborator Author

imagico commented Aug 2, 2014

Theoretically there would be another option to implement this without introducing a fixed geographic limit at all. Instead you could use a mapped boundary for this purpose. This would be easy with land color being the default and the coastlines being drawn as water polygons (a variant @gravitystorm has expressed preference for in the past although there might be performance issues). It would be more complicated when keeping the sea color default - it would probably require having the coastline polygons in the postgis db then.

You could either use the existing political boundaries for this purpose (https://www.openstreetmap.org/relation/2186646) which would keep things in line with the current mapping convention or you could map the Antarctic Convergence (http://en.wikipedia.org/wiki/Antarctic_Convergence) and use that (which would be a more natural limit but also more difficult to understand for the mappers and it would move South Georgia, South Sandwich Islands, Bouvet Island and Heard Island into the 'ice default' zone which would not be good from a practical standpoint - probably difficult to get this approved by the community).

I don't see a real advantage in any variant of this solution (except for formally avoiding a hardcoded geographic limit in the style) but it would be possible.

@imagico
Copy link
Collaborator Author

imagico commented Sep 18, 2014

I think it would be good to come to a decision in this matter - the pull request has been open now for three months and the problem it is meant to solve exists for more than a year. I am not attached to the pull request itself, would be happy to see another solution to the problem - i outlined a few possibilities in the discussion. But some solution is seriously called for in the matter, which - even if often not seen by map viewers due to its location - is a major error in the map.

I would be happy to bring this in sync with the recent other changes but not just for posterity so i am waiting for a definitive decision before i do this.

@matthijsmelissen
Copy link
Collaborator

Personally I think I would consider glacier a landuse like any other, and would not render it before z8 or so.

By the way, does Spitsbergen not have glaciers, or is the data missing?

@matkoniecz
Copy link
Contributor

I would consider glacier a landuse like any other, and change rendering to show it from z1.

@matthijsmelissen
Copy link
Collaborator

Also,

You are special casing part of the world in terms of specifying different styles there than the rest of the world, which is why I'm 👎 on it.

+1

To me it's still not clear what exactly is the 'major fault' you're talking about. Maybe it would help if you could explain more precisely why you see the current rendering as a problem?

@imagico
Copy link
Collaborator Author

imagico commented Sep 18, 2014

All right - although i think i explained in the original comment quite clearly here again in more detail:

The map currently does not render the largest glacier on earth, the Antarctic ice sheet, at any zoom level - see for example here. This is a major fault since it is the largest feature in the map that is clearly rendered incorrectly (14 million square kilometers and more than 1/8 of the total map area). This problem started when in the course of the Antarctica data imports last year the glacier multipolygon previously built up from the GADM coastlines was removed. This was discussed on the imports ML and in all discussions i had back then it was agreed that this is the sane thing to do - see also the wiki. Today it is quite definitely technically unfeasible to have a multipolygon relation for the ice sheet. The only glacier areas that currently show up in the map in Antarctica are the ice shelves (natural=glacier + glacier:type=shelf) and a few explicitly mapped smaller glaciers.

This pull request fixes this error in what i think is the least obtrusive way and in addition makes the two ice sheets (Antarctica and Greenland) show up at an earlier zoom level than previously (z=2 instead of z=6) although - as i already said - this can be easily changed and goes beyond the mere fix of the error.

Please keep in mind that definitively not fixing this error would mean either

  • permanently decoupling the standard style from the OSM mapping practice in this regard.
  • encouraging an enormous case of mapping for the renderer, i.e someone (not me!) might decide to split the ice sheet into thousands of multipolygons at arbitrary division that are small enough to be handled to make it show up in the map.

I can't really imagine anyone would want either of these.

@imagico
Copy link
Collaborator Author

imagico commented Sep 18, 2014

And @math1985 - glaciers on Spitsbergen are currently unmapped, if you want to do something about that GLIMS has fairly good data there.

@gravitystorm
Copy link
Owner

From my point of view:

  • I want to see the Antartic and Greenland ice sheets showing up as the mappers intend. Therefore we need to do something to resolve this without rehashing any tagging discussions.
  • I don't like the post-processing of the coastline shapefiles and splitting them up and colouring them differently.
  • I think ice sheets should be treated the same as glaciers and render more or less the same and at the same zoom levels.
  • I don't think they make a good addition at zoom level 2. After all, rainforests take up a lot of the surface of the earth etc

I'm going to close this PR. I would suggest the following approach instead:

  • Generate additional ice-sheet and simplified-ice-sheet shapefiles using a process similar to the coastline generation. Any latitude assumptions should go there, but there's also Greenland to consider.
  • Include the ice-sheet shapefiles below everything else except coastlines
  • Style them in the same way as glaciers
  • Celebrate the improved map rendering
  • Encourage other map creators to use these ice-sheet shapefiles

The latter is important to me - the chopping and changing of the coastline shapefiles is a bit too much black magic for most style developers to understand and replicate. The addition of specific shapefiles to show specific features is an easier concept to handle.

Finally, if anyone wants to take this on or has other things they want to discuss, let's open a specific issue rather than continuing on this closed PR.

@imagico
Copy link
Collaborator Author

imagico commented Sep 18, 2014

OK - fair enough, thank you for a clear decision on the matter. This assuming when you write 'ice shelf' you mean 'ice sheet', otherwise i would me extremely confused.

@gravitystorm
Copy link
Owner

This assuming when you write 'ice shelf' you mean 'ice sheet'

Ooops, yes - sorry!

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

Successfully merging this pull request may close these issues.

5 participants