Opened 10 years ago

Closed 10 years ago

#1576 closed enhancement (fixed)

auto detection of closed ways / areas

Reported by: osm@… Owned by: Knut Arne Bjørndal
Priority: major Milestone:
Component: osmarender Version:
Keywords: osmarender autodetect area closed polygon Cc:

Description

It would be really handy to have an autoselecting thingy detecting if a way is closed to handle that case seperatly in the stylesheets without the need for K=area, v=yes. Possible handle for the stylesheets would be e=polygon.

Attachments (3)

1576_alpha1.diff (4.6 KB) - added by Knut Arne Bjørndal 10 years ago.
First go at this. DO NOT USE!
1576_xslt.diff (5.7 KB) - added by Knut Arne Bjørndal 10 years ago.
Patch for osmarender/xslt that supports closed=yes|no. Also has a stylesheet change that's only useful for debugging!
1576_orp.diff (1.9 KB) - added by Knut Arne Bjørndal 10 years ago.
closed=yes|no implementation for or/p

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by Knut Arne Bjørndal

It wouldn't be a replacement for area=yes. The point of that is just to differentiate between for example highway=residential for a road that goes in a ring vs. highway=residential + area=yes where the entire area of the ring is paved.

comment:2 Changed 10 years ago by Knut Arne Bjørndal

Perhaps the test should be something like area!='no' and count(nd) > 2 and nd[0] == nd[last].

comment:3 Changed 10 years ago by Knut Arne Bjørndal

Owner: changed from osm@… to Knut Arne Bjørndal
Status: newassigned

I'm taking a look at implementing this in XSLT

Changed 10 years ago by Knut Arne Bjørndal

Attachment: 1576_alpha1.diff added

First go at this. DO NOT USE!

comment:4 Changed 10 years ago by Knut Arne Bjørndal

Dilemma:

The way it's implemented in 1576_alpha1 e=way only matches if e=area wouldn't match, which means things like a highway going in a circle wouldn't render.

So what do we do?

1) Have e=way work as before, and add e=area and e=non-area (suggestions for better names for the latter welcome) 2) Change all the current e=way to e=way|area. Bad solution. 3) ??? Any better ideas?

Changed 10 years ago by Knut Arne Bjørndal

Attachment: 1576_xslt.diff added

Patch for osmarender/xslt that supports closed=yes|no. Also has a stylesheet change that's only useful for debugging!

Changed 10 years ago by Knut Arne Bjørndal

Attachment: 1576_orp.diff added

closed=yes|no implementation for or/p

comment:5 Changed 10 years ago by Knut Arne Bjørndal

Note to self: Update docs when committing.

comment:6 Changed 10 years ago by Knut Arne Bjørndal

Committed in r13647

comment:7 Changed 10 years ago by Knut Arne Bjørndal

Resolution: fixed
Status: assignedclosed

Docs updated too.

Note: See TracTickets for help on using tickets.