uk.me.parabola.mkgmap.reader.osm
Class MultiPolygonRelation

java.lang.Object
  extended by uk.me.parabola.mkgmap.reader.osm.Element
      extended by uk.me.parabola.mkgmap.reader.osm.Relation
          extended by uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation
All Implemented Interfaces:
java.lang.Iterable<java.lang.String>
Direct Known Subclasses:
SeaPolygonRelation

public class MultiPolygonRelation
extends Relation

Representation of an OSM Multipolygon Relation.
The different way of the multipolygon are joined to polygons and inner polygons are cut out from the outer polygons.

Author:
WanMil

Field Summary
static java.lang.String STYLE_FILTER_LINE
           
static java.lang.String STYLE_FILTER_POLYGON
           
static java.lang.String STYLE_FILTER_TAG
           
 
Constructor Summary
MultiPolygonRelation(Relation other, java.util.Map<java.lang.Long,Way> wayMap, Area bbox)
          Create an instance based on an existing relation.
 
Method Summary
protected  Area getBbox()
           
protected  java.util.Map<java.lang.Long,Way> getMpPolygons()
           
protected  java.util.Map<java.lang.Long,Way> getTileWayMap()
           
protected  void postProcessing()
           
 void processElements()
          Process the ways in this relation.
 
Methods inherited from class uk.me.parabola.mkgmap.reader.osm.Relation
addElement, getElements, kind
 
Methods inherited from class uk.me.parabola.mkgmap.reader.osm.Element
addTag, copy, copyTags, deleteTag, getEntryIteratable, getId, getName, getTag, getTagsWithPrefix, iterator, removeAllTags, setId, setName, toBrowseURL, toTagString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLE_FILTER_TAG

public static final java.lang.String STYLE_FILTER_TAG
See Also:
Constant Field Values

STYLE_FILTER_LINE

public static final java.lang.String STYLE_FILTER_LINE
See Also:
Constant Field Values

STYLE_FILTER_POLYGON

public static final java.lang.String STYLE_FILTER_POLYGON
See Also:
Constant Field Values
Constructor Detail

MultiPolygonRelation

public MultiPolygonRelation(Relation other,
                            java.util.Map<java.lang.Long,Way> wayMap,
                            Area bbox)
Create an instance based on an existing relation. We need to do this because the type of the relation is not known until after all its tags are read in.

Parameters:
other - The relation to base this one on.
wayMap - Map of all ways.
wayRemoveTags - Marks which tags should be removed from a way after the complete multipolygon processing has finished
bbox - The bounding box of the tile
Method Detail

processElements

public void processElements()
Process the ways in this relation. Joins way with the role "outer" Adds ways with the role "inner" to the way with the role "outer"

Specified by:
processElements in class Relation

postProcessing

protected void postProcessing()

getTileWayMap

protected java.util.Map<java.lang.Long,Way> getTileWayMap()

getMpPolygons

protected java.util.Map<java.lang.Long,Way> getMpPolygons()

getBbox

protected Area getBbox()