|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.mkgmap.reader.osm.ElementSaver
public class ElementSaver
This is where we save the elements read from any of the file formats that are in OSM format. OSM format means that there are nodes, ways and relations and they have tags. Both the XML format and the binary format use this. In the early days of mkgmap, the nodes and ways were converted as soon as they were encountered in the input file. After relations that is not possible, you have to save up all the nodes and ways as they might be needed for relations. We also want access to the other ways/nodes to generate sea polygons, prepare for routing etc.
Field Summary | |
---|---|
static java.lang.String |
MKGMAP_REMOVE_TAG
name of the tag that contains a ;-separated list of tagnames that should be removed after all elements have been processed |
static java.lang.String |
MKGMAP_REMOVE_TAG_ALL_KEY
tagvalue of the MKGMAP_REMOVE_TAG if all tags should be removed |
Constructor Summary | |
---|---|
ElementSaver(EnhancedProperties args)
|
Method Summary | |
---|---|
void |
addNode(Node node)
Add the given node and save it. |
void |
addPoint(long id,
Coord co)
We use this to calculate a bounding box in the situation where none is given. |
void |
addRelation(Relation rel)
Add the given relation. |
void |
addWay(Way way)
Add the given way. |
void |
convert(OsmConverter converter)
After the input file is read, this is called to convert the saved information into the general intermediate format. |
Relation |
createMultiPolyRelation(Relation rel)
Create a multipolygon relation. |
SeaPolygonRelation |
createSeaPolyRelation(Relation rel)
|
void |
deferRelation(long id,
Relation rel,
java.lang.String role)
|
void |
finishLoading()
|
Area |
getBoundingBox()
Get the bounding box. |
Coord |
getCoord(long id)
|
Node |
getNode(long id)
|
Relation |
getRelation(long id)
|
Way |
getWay(long id)
|
java.util.Map<java.lang.Long,Way> |
getWays()
|
void |
setBoundingBox(Area bbox)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MKGMAP_REMOVE_TAG
public static final java.lang.String MKGMAP_REMOVE_TAG_ALL_KEY
MKGMAP_REMOVE_TAG
if all tags should be removed
Constructor Detail |
---|
public ElementSaver(EnhancedProperties args)
Method Detail |
---|
public void addPoint(long id, Coord co)
co
- The point.public void addNode(Node node)
node
- The osm node.public void addWay(Way way)
way
- The osm way.public void addRelation(Relation rel)
rel
- The osm relation.public Relation createMultiPolyRelation(Relation rel)
rel
- The original relation, that the result will replace.
public SeaPolygonRelation createSeaPolyRelation(Relation rel)
public void setBoundingBox(Area bbox)
public Coord getCoord(long id)
public Node getNode(long id)
public Way getWay(long id)
public Relation getRelation(long id)
public void finishLoading()
public void convert(OsmConverter converter)
converter
- The Converter to use.public java.util.Map<java.lang.Long,Way> getWays()
public Area getBoundingBox()
public void deferRelation(long id, Relation rel, java.lang.String role)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |