[Tagging] Using multipolygons to map bays in Alaska
osm at imagico.de
Thu Nov 15 20:00:56 UTC 2018
On Thursday 15 November 2018, Kevin Kenny wrote:
> With these geometries:
> > https://www.openstreetmap.org/way/372986131
> > https://www.openstreetmap.org/relation/2824513
> > a large portion of the geometry and as a result the derived
> > way_area are completely non-verifiable. Also here a properly
> > placed node would together with the coastline transport all the
> > verifiable information about the geographic reality there is.
> Even in that extreme example, having the spatial extent adds value.
Data of subjective value for a specific application (like low quality
label rendering) - yes, obviously. Meaningful additional information
about the verifiable geography - no, i don't think so.
> Consider a large-scale map of the villages of Audierne
> https://www.openstreetmap.org/node/26698453 and Poulgoazec, rendered
> on a sheet of paper. How will the renderer of such a paper map
> determine that the body of water on the southern edge of the sheet is
> to acquire the name, 'Baie D'Audierne', without information about the
> spatial extent of the bay? (I do not ask this question in terms of
> any particular piece of rendering software - and in particular not
> Mapnik-OSM Carto. The question is how, even in theory, any
> conceivable renderer can be expected to make that determination.)
Yes, been there, done that.
What you usually will want to start with is finding the closest point on
the coastline. You might not want to use the original coastline data
but pre-process it to some extent to for example eliminate small
If you just want to do a primitive importance rating based point label
rendering like OSM-Carto you will then just take all coastlines within
something like 3-5 times that distance and make a bay size assessment
based on that - your choice how fancy you want to make this. Simplest
version is to use the distance right away but you can easily make this
a bit more robust.
If you actually want to place a label dynamically procedure will depend
a lot on the style of label you want to use - horizontal single line,
multi-line, rotated, curved - font size scaled or characters spaced
according to the extent of the label. This part can be somewhat akward
and inefficient because common spatial database systems are not
specifically designed for this kind of task. What you need to do is
essentially to 'probe' the coastline environment and determine the
extent of the bay and where the desired label best fits in there.
Obviously you can take a map sheet bounding box into account when doing
that but you will need to analyze the data beyond these bounds of
More information about the Tagging