|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.filter.v0_5.impl.BaseDatasetReader
org.openstreetmap.osmosis.core.customdb.v0_5.impl.DatasetStoreReader
public class DatasetStoreReader
Provides read-only access to a dataset store. Each thread accessing the store must create its own reader. The reader maintains all references to heavyweight resources such as file handles used to access the store eliminating the need for objects such as object iterators to be cleaned up explicitly.
Constructor Summary | |
---|---|
DatasetStoreReader(NodeStorageContainer nodeStorageContainer,
WayStorageContainer wayStorageContainer,
RelationStorageContainer relationStorageContainer,
boolean enableWayTileIndex)
Creates a new instance. |
Method Summary | |
---|---|
Node |
getNode(long id)
Retrieves a specific node by its identifier. |
protected ReleasableIterator<java.lang.Long> |
getNodeIdsForTileRange(int minimumTile,
int maximumTile)
Returns all nodes that are contained within the specified tile range. |
Relation |
getRelation(long id)
Retrieves a specific relation by its identifier. |
protected ReleasableIterator<java.lang.Long> |
getRelationIdsOwningNode(long nodeId)
Returns all relations that contain the specified node. |
protected ReleasableIterator<java.lang.Long> |
getRelationIdsOwningRelation(long relationId)
Returns all relations that contain the specified relation. |
protected ReleasableIterator<java.lang.Long> |
getRelationIdsOwningWay(long wayId)
Returns all relations that contain the specified way. |
Way |
getWay(long id)
Retrieves a specific way by its identifier. |
protected ReleasableIterator<java.lang.Long> |
getWayIdsForTileRange(int minimumTile,
int maximumTile)
Returns all ways that are contained within the specified tile range. |
protected ReleasableIterator<java.lang.Long> |
getWayIdsOwningNode(long nodeId)
Returns all ways that contain the specified node. |
protected boolean |
isTileWayIndexAvailable()
Indicates if a tile index is available for ways or if a node to way index must be used instead. |
ReleasableIterator<EntityContainer> |
iterate()
Allows the entire dataset to be iterated across. |
void |
release()
Performs resource cleanup tasks such as closing files, or database connections. |
Methods inherited from class org.openstreetmap.osmosis.core.filter.v0_5.impl.BaseDatasetReader |
---|
iterateBoundingBox |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatasetStoreReader(NodeStorageContainer nodeStorageContainer, WayStorageContainer wayStorageContainer, RelationStorageContainer relationStorageContainer, boolean enableWayTileIndex)
nodeStorageContainer
- The node storages.wayStorageContainer
- The way storages.relationStorageContainer
- The relation storages.enableWayTileIndex
- If true a tile index is created for ways, otherwise a node-way
index is used.Method Detail |
---|
protected ReleasableIterator<java.lang.Long> getNodeIdsForTileRange(int minimumTile, int maximumTile)
getNodeIdsForTileRange
in class BaseDatasetReader
minimumTile
- The minimum tile to match.maximumTile
- The maximum tile to match.
protected ReleasableIterator<java.lang.Long> getWayIdsForTileRange(int minimumTile, int maximumTile)
getWayIdsForTileRange
in class BaseDatasetReader
minimumTile
- The minimum tile to match.maximumTile
- The maximum tile to match.
protected ReleasableIterator<java.lang.Long> getWayIdsOwningNode(long nodeId)
getWayIdsOwningNode
in class BaseDatasetReader
nodeId
- The node for which to retrieve parent ways.
protected ReleasableIterator<java.lang.Long> getRelationIdsOwningNode(long nodeId)
getRelationIdsOwningNode
in class BaseDatasetReader
nodeId
- The node for which to retrieve parent relations.
protected ReleasableIterator<java.lang.Long> getRelationIdsOwningWay(long wayId)
getRelationIdsOwningWay
in class BaseDatasetReader
wayId
- The way for which to retrieve parent relations.
protected ReleasableIterator<java.lang.Long> getRelationIdsOwningRelation(long relationId)
getRelationIdsOwningRelation
in class BaseDatasetReader
relationId
- The relation for which to retrieve parent relations.
protected boolean isTileWayIndexAvailable()
isTileWayIndexAvailable
in class BaseDatasetReader
public Node getNode(long id)
id
- The id of the node.
public Way getWay(long id)
id
- The id of the way.
public Relation getRelation(long id)
id
- The id of the relation.
public ReleasableIterator<EntityContainer> iterate()
public void release()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |