uk.me.parabola.mkgmap.reader.osm
Interface OsmConverter

All Known Implementing Classes:
StyledConverter, StyleTester

public interface OsmConverter

Author:
Steve Ratcliffe

Method Summary
 void convertNode(Node node)
          Takes a node (that has its own identity) and converts it from the OSM type to the Garmin map type.
 void convertRelation(Relation relation)
          Takes a relation and applies rules that affect the garmin types of its contained elements.
 void convertWay(Way way)
          This takes the way and works out what kind of map feature it is and makes the relevant call to the mapper callback.
 void end()
          Called when all conversion has been done.
 void setBoundingBox(Area bbox)
          Set the bounding box for this map.
 

Method Detail

convertWay

void convertWay(Way way)
This takes the way and works out what kind of map feature it is and makes the relevant call to the mapper callback. As a few examples we might want to check for the 'highway' tag, work out if it is an area of a park etc.

Parameters:
way - The OSM way.

convertNode

void convertNode(Node node)
Takes a node (that has its own identity) and converts it from the OSM type to the Garmin map type.

Parameters:
node - The node to convert.

convertRelation

void convertRelation(Relation relation)
Takes a relation and applies rules that affect the garmin types of its contained elements. The relation rules are run first. A relation contains references to a number of nodes, ways and even other relations, as well as its own set of tags. They have many purposes some of which are not relevant to styling.

Parameters:
relation - The relation to convert.

setBoundingBox

void setBoundingBox(Area bbox)
Set the bounding box for this map. This should be set before any other elements are converted if you want to use it. All elements that are added are clipped to this box, new points are added as needed at the boundary. If a node or a way falls completely outside the boundary then it would be omitted. This would not normally happen in the way this option is typically used however.

Parameters:
bbox - The bounding area.

end

void end()
Called when all conversion has been done.