Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

[landcover] rendering barrier=hedge as closed area #3395

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 9 comments
Closed

[landcover] rendering barrier=hedge as closed area #3395

openstreetmap-trac opened this issue Jul 23, 2021 · 9 comments

Comments

@openstreetmap-trac
Copy link

Reporter: thiesp
[Submitted to the original trac issue database at 12.00am, Wednesday, 15th December 2010]

Look here:

http://www.openstreetmap.org/?lat=55.372914&lon=10.404336&zoom=18&layers=M

This is the corresponding changeset:

http://www.openstreetmap.org/browse/changeset/6664276

The hedges mapped as areas aren't rendered as expected. I expected they would be filled green, instead of the color from the polygon below.

I even added area=yes to try to enforce it, but no luck.

@openstreetmap-trac
Copy link
Author

Author: steve8[at]mdx.ac.uk
[Added to the original trac issue at 6.01pm, Sunday, 16th January 2011]

Added in version just committed (r25076), will show when deployed - if using area=yes

@openstreetmap-trac
Copy link
Author

Author: craigloftus
[Added to the original trac issue at 5.12pm, Wednesday, 26th January 2011]

This fix does not allow one to mark the boundary of an area as having the barrier hedge (but still lets you do it for every other kind of barrier). I think it has changed the behaviour from that described in the documentation and from what I think many users will expect.

I'm not clear this is a regression, or just an inconsistency in treatment of hedge vs other linear barriers; I can certainly understand the use-case described by thiesp.

=== Examples ===
The following tags have the area filled 'hedge' green ([http://www.openstreetmap.org/browse/way/96832522 #79975283]):

  landuse=farmland
  barrier=hedge

The following tags have the area filled 'garden' green with a black line around the boundary ([http://www.openstreetmap.org/browse/way/79975283 #79975283]):

  leisure=garden
  barrier=wall

@openstreetmap-trac
Copy link
Author

Author: Ldp
[Added to the original trac issue at 10.26pm, Wednesday, 16th March 2011]

Replying to [comment:3 craigloftus]:

The following tags have the area filled 'hedge' green ([http://www.openstreetmap.org/browse/way/96832522 #79975283]):

  landuse=farmland
  barrier=hedge

barrier=hedge has an explicit area variant, so it's drawn as an area in this case, overpainting the landuse=farmland.

The following tags have the area filled 'garden' green with a black line around the boundary ([http://www.openstreetmap.org/browse/way/79975283 #79975283]):

  leisure=garden
  barrier=wall

barrier=wall has no area variant. Hence only the linear version is drawn.

I'm not sure what can be done about this. How is the renderer to discern between a closed way where the hedge is only around the perimeter vs. a closed way where the entire interior is hedge? They both look exactly the same to it.

@openstreetmap-trac
Copy link
Author

Author: craigloftus
[Added to the original trac issue at 9.37am, Thursday, 17th March 2011]

Replying to [comment:4 Ldp]:

barrier=hedge has an explicit area variant, so it's drawn as an area in this case, overpainting
the landuse=farmland.

Would you explain why barrier=hedge has "an explicit area variant" but barrier=wall doesn't? The tagging documentation ([http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dhedge Tag:barrier=hedge]) doesn't say that? In fact the documentation seems to state the opposite when it says that barrier=hedge can be used to "mark the boundary of an area. Useful in conjunction with Tag:landuse=farm to mark field boundaries."?

I'm not sure what can be done about this. How is the renderer to discern between a closed way
here the hedge is only around the perimeter vs. a closed way where the entire interior is hedge?
They both look exactly the same to it.

Perhaps an explicit area=yes tag on the hedge way would be appropriate?

@openstreetmap-trac
Copy link
Author

Author: Ldp
[Added to the original trac issue at 7.17pm, Thursday, 17th March 2011]

Replying to [comment:5 craigloftus]:

Would you explain why barrier=hedge has "an explicit area variant" but barrier=wall doesn't?

... in the mapnik stylesheet. Could've made that clearer.

Useful in conjunction with Tag:landuse=farm to mark field boundaries."?

How would you get onto the field when there's a hedge all around it? :)

Perhaps an explicit area=yes tag on the hedge way would be appropriate?

Area handling being the default in this case, that would accomplish exactly nothing.

As I said, it's a tricky one, with no clear answer just yet.

@openstreetmap-trac
Copy link
Author

Author: rohieb
[Added to the original trac issue at 4.11am, Thursday, 5th January 2012]

I have just discovered this behaviour. I have allotments which are surrounded by a hedge with gates in it. So I used a closed way tagged with landuse=allotments,barrier=hedge and barrier=gate for the nodes where the hedge crosses the paths going through it.

However, the area of the way is completely green, not filled with the allotments pattern (see http://www.openstreetmap.org/browse/way/23713197).

While I acknowledge the usefulness of the "area variant" of barrier=hedge, I think it's generally a bad idea to default to it, at least in this case. When I use {{barrier=wall}} instead, it shows the exact behaviour I would expect (allotments pattern with a grey border), so defaulting to the non-area variant of barrier=hedge follows the principle of least surprise. Furthermore, it is still possible to use area=yes if one explicitly wants the area variant.

@openstreetmap-trac
Copy link
Author

Author: rohieb
[Added to the original trac issue at 4.22am, Thursday, 5th January 2012]

I just tried area=no on the closed way. The hedge is now only a line around the border, but the allotment pattern is gone too...! So this is actually a regression which makes it impossible to render an area enclosed by a hedge correctly.

@openstreetmap-trac
Copy link
Author

Author: Ldp
[Added to the original trac issue at 10.57pm, Thursday, 5th January 2012]

Replying to [comment:8 rohieb]:

I just tried area=no on the closed way. The hedge is now only a line around the border, but the allotment pattern is gone too...!

Well, yes, of course. You're attaching two conflicting meanings onto a single way. That single way is processed based on its tags. If it has a landuse=, it will be processed as a polygon, not as a line. No matter what other tags are present. In fact, if there are other tags, like barrier=, that the renderer also understands, it can also only process them as a polygon as well.

This is what's happening with barrier=hedge. There is a polygon variant in the stylesheet, so it can draw it as such. There is no polygon variant for barrier=wall, so it will not render a barrier, neither as a polygon nor as a line.

So this is actually a regression which makes it impossible to render an area enclosed by a hedge correctly.

Sure you can model this: Don't cram two conflicting meanings onto a single way. Use two ways.

You're going to have a hard time with this situation anyway (using a single way) once OSM progresses to an area datatype.

@openstreetmap-trac
Copy link
Author

Author: Mateusz Konieczny
[Added to the original trac issue at 8.09am, Thursday, 3rd July 2014]

Nowadays it is fixed.

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

No branches or pull requests

1 participant