public class QuadBucketPrimitiveStore extends java.lang.Object
DataSet
This class does not do any synchronization.| Modifier and Type | Field and Description |
|---|---|
private QuadBuckets<Node> |
nodes
All nodes goes here, even when included in other data (ways etc).
|
private java.util.Collection<Relation> |
relations
All relations/relationships
|
private QuadBuckets<Way> |
ways
All ways (Streets etc.) in the DataSet.
|
| Constructor and Description |
|---|
QuadBucketPrimitiveStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPrimitive(OsmPrimitive primitive)
Adds a primitive to this quad bucket store
|
void |
clear()
Removes all primitives from the this store.
|
boolean |
containsNode(Node n)
Determines if the given node can be retrieved in the data set through its bounding box.
|
boolean |
containsRelation(Relation r)
Determines if the given relation can be retrieved in the data set through its bounding box.
|
boolean |
containsWay(Way w)
Determines if the given way can be retrieved in the data set through its bounding box.
|
protected void |
reindexNode(Node node,
LatLon newCoor,
EastNorth eastNorth)
Re-index the relation after it's position was changed.
|
protected static void |
reindexRelation(Relation relation)
Re-index the relation after it's position was changed.
|
protected void |
reindexWay(Way way)
Re-index the way after it's position was changed.
|
protected void |
removePrimitive(OsmPrimitive primitive) |
java.util.List<Node> |
searchNodes(BBox bbox)
Searches for nodes in the given bounding box.
|
java.util.List<Relation> |
searchRelations(BBox bbox)
Searches for relations in the given bounding box.
|
java.util.List<Way> |
searchWays(BBox bbox)
Searches for ways in the given bounding box.
|
private final QuadBuckets<Node> nodes
private final QuadBuckets<Way> ways
public QuadBucketPrimitiveStore()
public java.util.List<Node> searchNodes(BBox bbox)
bbox - the bounding boxpublic boolean containsNode(Node n)
n - The node to searchtrue if n ban be retrieved in this data set, false otherwisepublic java.util.List<Way> searchWays(BBox bbox)
bbox - the bounding boxpublic boolean containsWay(Way w)
w - The way to searchtrue if w ban be retrieved in this data set, false otherwisepublic java.util.List<Relation> searchRelations(BBox bbox)
bbox - the bounding boxpublic boolean containsRelation(Relation r)
r - The relation to searchtrue if r ban be retrieved in this data set, false otherwisepublic void addPrimitive(OsmPrimitive primitive)
primitive - the primitive.protected void removePrimitive(OsmPrimitive primitive)
protected void reindexNode(Node node, LatLon newCoor, EastNorth eastNorth)
node - The node to re-indexnewCoor - The new coordinateseastNorth - The new east/north positionprotected void reindexWay(Way way)
way - The way to re-indexprotected static void reindexRelation(Relation relation)
relation - The relation to re-indexpublic void clear()