Re: [OSM-talk] Nested areas

2008-06-06 Thread spaetz
On Thu, Jun 05, 2008 at 08:14:02PM +0100, Jon Burgess wrote:
 On Thu, 2008-06-05 at 19:49 +0200, spaetz wrote:

  Why should it work differently? If I want a tunnel under a forest, a
  layer=-1 *should* draw the tunnel under the forest. Why do you think
  it's doing something wrongly? 
 
 If the tunnel becomes invisible because the forest is drawn on top then
 that does not look good. If however the tunnel was drawn over the top
 with an appropriate style then that may be more useful. Mapnik would
 render the tunnel on top of the area but using a dashed style.

OK, tunnel is a bad example on my side. But there are things that I want in the 
data, but not drawn in regular maps. Think of a dug in powerline (some maps 
might want to show these too, I know...).

  tagging a river with layer=-1 seems wrong to me on the other hand.
 Buildings are often constructed over the top of rivers. Whether the
 building is +1 or the river is -1 surely just depends on where you take
 your ground reference. If the river really flows through the building
 then I guess the layer tag is not the right answer.

If you do that for the river part that goes through/under a buiding, then I 
agree. I have tagged river bits under bridges with -1 myself.

But if you tag a river universally over quite a bit with layer=-1 just for the 
fun of it, as was in the original example, then this looks weird. And 
osmarender is right to make it look weird, isn't it?

 A similar issue must occur frequently with railway lines through train
 stations.

I'd think so, yep.

spaetz

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Nested areas

2008-06-06 Thread Robert Vollmert

On Jun 6, 2008, at 09:09, spaetz wrote:
 But if you tag a river universally over quite a bit with layer=-1  
 just for the fun of it, as was in the original example, then this  
 looks weird. And osmarender is right to make it look weird, isn't it?

I think this can be correct, if say a river runs in a river bed that's  
dug into to the landscape. So the surface of the river is always say  
2m below the surrounding areas. Bridges over the river are flat.

Cheers
Robert


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Nested areas

2008-06-06 Thread Steve Hill
On Thu, 5 Jun 2008, spaetz wrote:

 Why should it work differently? If I want a tunnel under a forest, a 
 layer=-1 *should* draw the tunnel under the forest.

It isn't in a tunnel though - if it was, it would have tunnel=yes. 
layer=-1 is often used for waterways for a couple of reasons:

1. It indicates it is below the _general_ level of the local ground (note: 
this does not imply it is a covered tunnel)
2. It means that ways which pass over the top don't need to explicitly be 
moved to a higher layer, which makes editing easier.

I don't think areas, such as landuse, natural, etc. should be considered 
as something physically laid on top of the land - they merely describe the 
use of the land within them and thus should not obscure other objects any 
more than the land itself should.

If the land itself isn't obscuring objects, why should an area tag, which 
effectively just describes some properties of that land.

  - Steve
xmpp:[EMAIL PROTECTED]   sip:[EMAIL PROTECTED]   http://www.nexusuk.org/

  Servatis a periculum, servatis a maleficum - Whisper, Evanescence


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk



Re: [OSM-talk] Nested areas

2008-06-05 Thread cobaco (aka Bart Cornelis)
On 2008-06-05, Steve Hill wrote:
 Can areas be nested? 

Yes, mapped one recently

 To a human, it is fairly obvious that a small areas which is completely
 enclosed within a larger area should take presidence, but are the
 renderers expected to understand this?

I had to add a layer tag to get it rendered correctly, so apperently 
renderers don't currenlty understand this by default, but you can tell them 
about it :)
-- 
Cheers, cobaco (aka Bart Cornelis)


signature.asc
Description: This is a digitally signed message part.
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Nested areas

2008-06-05 Thread Dave Stubbs
On Thu, Jun 5, 2008 at 12:28 PM, cobaco (aka Bart Cornelis)
[EMAIL PROTECTED] wrote:
 On 2008-06-05, Steve Hill wrote:
 Can areas be nested?

 Yes, mapped one recently

 To a human, it is fairly obvious that a small areas which is completely
 enclosed within a larger area should take presidence, but are the
 renderers expected to understand this?

 I had to add a layer tag to get it rendered correctly, so apperently
 renderers don't currenlty understand this by default, but you can tell them
 about it :)


Layer tags on areas are pure evil. The layer tag is there to indicate
vertical separation, not to give a handy z-order hint to the renderer.
So unless you do genuinely have two areas which are physically
suspended one on top of the other then please don't add layer tags!
Thankfully the mapnik maps will just ignore them.
Instead you should fix the renderer, which may include adding
something like handy_renderer_z_order_hint=1 to your objects if there
isn't a better way.

Dave

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Nested areas

2008-06-05 Thread Steve Hill
On Thu, 5 Jun 2008, Dave Stubbs wrote:

 If the 2nd area is meant to replace the 1st rather than just say
 something extra about the land/water then you should probably make a
 hole.

Hmm.. ok.  Looks like I need to investigate the multipolygon relations 
stuff.

 osmarender rules pay attention to the layer tag even when dealing with
 areas. In this case the river is on layer=-1, and the industrial area
 has no layer tag (so defaults to 0). osmarender is rendering all -1
 objects first, then moves on to the layer 0 objects.

This seems wrong to me.  An easy fix would be to subtract a number (e.g. 
10) from the layer value of areas so they always get rendered under 
non-area objects.  Maybe I'll look at doing this when I don't have a 
hundred and one other things to do. :)  I suspect there's no easy way of 
doing the surface-area calculation to keep small areas on top though.

  - Steve
xmpp:[EMAIL PROTECTED]   sip:[EMAIL PROTECTED]   http://www.nexusuk.org/

  Servatis a periculum, servatis a maleficum - Whisper, Evanescence


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Nested areas

2008-06-05 Thread Martijn van Oosterhout
On Thu, Jun 5, 2008 at 2:07 PM, Dave Stubbs [EMAIL PROTECTED] wrote:
 Layer tags on areas are pure evil. The layer tag is there to indicate
 vertical separation, not to give a handy z-order hint to the renderer.
 So unless you do genuinely have two areas which are physically
 suspended one on top of the other then please don't add layer tags!
 Thankfully the mapnik maps will just ignore them.

Not entirely. On the NL list we had a building overlapping a water
area and mapnik was drawing them in the wrong order. Due to the
shapes, the building covered more area. Perhaps longterm we should
change the styles to always draw buildings over waterways, but for now
a layer tags fixes it nicely.

Have a nice day,
-- 
Martijn van Oosterhout [EMAIL PROTECTED] http://svana.org/kleptog/

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Nested areas

2008-06-05 Thread Dave Stubbs
On Thu, Jun 5, 2008 at 5:24 PM, Martijn van Oosterhout
[EMAIL PROTECTED] wrote:
 On Thu, Jun 5, 2008 at 2:07 PM, Dave Stubbs [EMAIL PROTECTED] wrote:
 Layer tags on areas are pure evil. The layer tag is there to indicate
 vertical separation, not to give a handy z-order hint to the renderer.
 So unless you do genuinely have two areas which are physically
 suspended one on top of the other then please don't add layer tags!
 Thankfully the mapnik maps will just ignore them.

 Not entirely. On the NL list we had a building overlapping a water
 area and mapnik was drawing them in the wrong order. Due to the
 shapes, the building covered more area. Perhaps longterm we should
 change the styles to always draw buildings over waterways, but for now
 a layer tags fixes it nicely.



It might fix it. But it doesn't fix it nicely.
You're taking something meant to represent a physical property, and
abusing it to produce a pretty map. The question here is whether your
building is actually over the water or not; if it is then adding the
layer tag is actually correct for once, but if it isn't then please,
please invent a new tag rather than abuse an existing one.

Although that's been going on for ages now with the layer tag, so it's
quite possibly useless except as a render hint which is a pity.
At least it's not quite as silly as natural=land.

Dave

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Nested areas

2008-06-05 Thread spaetz
On Thu, Jun 05, 2008 at 12:10:23PM +0100, Steve Hill wrote:
 As a side note, I noticed that whilst Mapnik appears to be quite good at 
 rendering areas (e.g. industrial landuse) under the ways, Osmarender 
 doesn't seem smart enough and areas sometimes obscure ways.  For example, 
 the river is obscured by an industrial area here: 
 http://www.openstreetmap.org/?lat=51.68998lon=-3.9007zoom=16layers=0B0FT

Osma does it exactly right. That river has a layer=-1 while the landuse has no 
layer (implying 0). The data-wise, the river *is under the idustrial area*. I 
haven't fixed it.

spaetz

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Nested areas

2008-06-05 Thread spaetz
  osmarender rules pay attention to the layer tag even when dealing with
  areas. In this case the river is on layer=-1, and the industrial area
  has no layer tag (so defaults to 0). osmarender is rendering all -1
  objects first, then moves on to the layer 0 objects.
 
 This seems wrong to me.  An easy fix would be to subtract a number (e.g. 
 10) from the layer value of areas so they always get rendered under 
 non-area objects.  Maybe I'll look at doing this when I don't have a 
 hundred and one other things to do. :)  I suspect there's no easy way of 
 doing the surface-area calculation to keep small areas on top though.

Why should it work differently? If I want a tunnel under a forest, a layer=-1 
*should* draw the tunnel under the forest. Why do you think it's doing 
something wrongly? tagging a river with layer=-1 seems wrong to me on the other 
hand.

spaetz

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Nested areas

2008-06-05 Thread Jon Burgess
On Thu, 2008-06-05 at 19:49 +0200, spaetz wrote:
   osmarender rules pay attention to the layer tag even when dealing with
   areas. In this case the river is on layer=-1, and the industrial area
   has no layer tag (so defaults to 0). osmarender is rendering all -1
   objects first, then moves on to the layer 0 objects.
  
  This seems wrong to me.  An easy fix would be to subtract a number (e.g. 
  10) from the layer value of areas so they always get rendered under 
  non-area objects.  Maybe I'll look at doing this when I don't have a 
  hundred and one other things to do. :)  I suspect there's no easy way of 
  doing the surface-area calculation to keep small areas on top though.
 
 Why should it work differently? If I want a tunnel under a forest, a
 layer=-1 *should* draw the tunnel under the forest. Why do you think
 it's doing something wrongly? 

If the tunnel becomes invisible because the forest is drawn on top then
that does not look good. If however the tunnel was drawn over the top
with an appropriate style then that may be more useful. Mapnik would
render the tunnel on top of the area but using a dashed style.


 tagging a river with layer=-1 seems wrong to me on the other hand.

Buildings are often constructed over the top of rivers. Whether the
building is +1 or the river is -1 surely just depends on where you take
your ground reference. If the river really flows through the building
then I guess the layer tag is not the right answer.

A similar issue must occur frequently with railway lines through train
stations.

Jon



___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk