Rendering Depths with Smrender
I started to experiment with the rendering of depths with Smrender. At a first glance this looks trivial but one might err. OSM data as well as a chart is just a two-dimensional plane. So, where’s the problem?
As long as the elevation is monotonic, observed from any point in the two-dimensional “plane”, there is no problem. But if this is not the case, filling areas on the chart properly gets difficult. In particular this is true at least if there is no structural information about the third dimension in the data.
Non-monotonic cases are such where areas of lower elevation are enclosed by areas of higher elevation or vice versa or combinations of both. Typical examples are lakes, islands within lakes, or lakes on such islands. Of course, the same structures are also found on the bottom of the sea.
As already mentioned, filling such areas is difficult. Although I do not know, I believe that this is the reason for the existence of the relation type multipolygon in OSM. It targets exactly those cases from above.
Smrender does not care about relations and multipolygons; it uses an approach of ordered filling and “clearing” dependent on the area and the order of the nodes of the polygons.1 This works because areas of different elevation do never intersect.2
I am into OSM and sea charts in particular since more than two years and there is a long ongoing and seemingly endless discussion about tagging of marine features. In my opinion this is an unnecessarily prolonged political discussion. However, OpenSeamap uses a well-structured S-57-based tagging scheme.
I introduced some new tags:3
seamark:type=sounding + seamark:sounding=<x> for soundings; x is the depth in meters. These tags are used for nodes only. Additionally
seamark:sounding:quality=* may be added (INT-1 II 10). The value of
reported_unconfirmed may be used for to draw a dotted line arround the sounding (INT-1 II 4) and
approx for a dashed line (INT-1 II 31).
For ways, the tags
seamark:type=depthcont + seamark:depthcont=<x> (INT-1 II 30) is used.
Where did I get the soundings from?
Well, since I needed some data for my render test, I simply scanned a part of an official sea chart, imported it into Josm using the Piclayer-Plugin and just copied the soundings and some isometric lines into a new layer 😉
Of course I did not and I will not publish this data because it is copyright protected and I use it just for my personal test.