Most hedges have been added to OpenStreetMap as lines. Most renderers show something like this:
and everyone’s happy.
However, from the beginning of OSM, people have mapped some hedges as areas, so for example something like this:
is clearly meant to be an area. The map style at map.atownsend.org.uk inherited what “OSM Carto” did in 2014, which was to show linear hedges as lines (using one bit of code) and area hedges as areas (using another). This works fine here:
However, in some cases there are problems. In an osm2pgsql database, an object can only be either an area or a line, but not a bit of both. If a tag that is thought to apply only to lines is found on an area, it will be ignored. Another effect is that if a hedge is drawn around an obviously area object (a field, for example), then the hedge will also be considered an area, if hedge areas are “a thing” in that map style:
See for example here:
which results in this “very large area hedge”:
More details and links to previous discussion can be found on the github issue here. The solution was this - if another tag might be making the item into an area feature, assume that the hedge is linear, but if no other tag is doing that, assume that the hedge is an area.
This results in the correct rendering here:
As an aside, in 2019 OSM Carto removed support for area hedges, and numerous people complained about that change. The result is that OSM Carto gets the “field” one above right but fails basic tests such as the example at the top of this diary entry:
To be fair - it’s not entirely the OSM Carto developers’ fault - part of the problem is mappers combining “features they expect to be linear” and “features they expect to be areas”, and partly that is because OSM does not have an area data type.
Although it’s not perfect, the solution here is clearly a better one than what they went with.
As another aside, the mismapping of hedges with
barrier=hedge; area=yes when (according to the imagery) they are clearly not hedge areas is a real problem. As an example, if you look at the imagery here you can see that’s clearly a field, not a very big hedge. However (before some enthusiast decides a mechanical edit is in order) not all of these are mistagged - this one is just a very big hedge.
For completeness, from a database count there are 5999 “area hedges” in UK/IE, and 3026 “linear hedges around other area features”. Some of those “area hedges” should probably be something else (for example, way 1086001254 is a bit of a stretch as a hedge), and some of those “linear hedges” might actually be areas if an area hedge is, say, it’s very own nature reserve.