[OSM-talk] Nested areas
Dave Stubbs
osm.list at randomjunk.co.uk
Thu Jun 5 12:59:43 BST 2008
On Thu, Jun 5, 2008 at 12:10 PM, Steve Hill <steve at nexusuk.org> wrote:
>
> Can areas be nested? i.e. if there is a large amount of farmland with a
> wooded area in the middle, can you just draw a large area for the farmland
> and a smaller area within it for the wooded land, or do you have to make
> sure the areas don't overlap (e.g. by leaving a hole in the middle of the
> farmland).
>
> This applies to many other areas, such as lakes within parks, schools
> within residential areas, etc.
The question isn't so much whether you can, as whether you want to.
Is the wood really farm land? Probably not, but it may well be part of a farm.
It's that old logical, physical thing again.
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.
Lakes and parks get a little obscure because what is meant by "park"
hasn't really been defined. Personally I think a lake is part of a
park (makes editing easier too :-) ).
>
> 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?
osm2pgsql calculates the area of a polygon, and the main osm mapnik
rules (and the cyclemap) use this to ensure that small areas are
always rendered on top of larger areas. This is probably the right way
round in 99% of cases. The ones where it might be wrong are for
overlapping areas rather than nested areas.
>
> 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.68998&lon=-3.9007&zoom=16&layers=0B0FT
>
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. In the mapnik
maps all areas are rendered first and the layer tag only applies to
the roads in relation to other roads.
Dave
More information about the talk
mailing list