public class OsmElementCounterReaderAdapter extends Object implements OsmElementCounter, OsmHandler
Constructor and Description |
---|
OsmElementCounterReaderAdapter(OsmReader reader) |
Modifier and Type | Method and Description |
---|---|
void |
complete() |
void |
count() |
long |
getNumberOfElements(EntityType type) |
long |
getNumberOfNodes() |
long |
getNumberOfRelations() |
long |
getNumberOfWays() |
long |
getTotalNumberOfElements() |
void |
handle(OsmBounds bounds) |
void |
handle(OsmNode node) |
void |
handle(OsmRelation relation) |
void |
handle(OsmWay way) |
public OsmElementCounterReaderAdapter(OsmReader reader)
public void handle(OsmBounds bounds) throws IOException
handle
in interface OsmHandler
IOException
public void handle(OsmNode node) throws IOException
handle
in interface OsmHandler
IOException
public void handle(OsmWay way) throws IOException
handle
in interface OsmHandler
IOException
public void handle(OsmRelation relation) throws IOException
handle
in interface OsmHandler
IOException
public void complete() throws IOException
complete
in interface OsmHandler
IOException
public void count() throws OsmInputException
count
in interface OsmElementCounter
OsmInputException
public long getNumberOfNodes()
getNumberOfNodes
in interface OsmElementCounter
public long getNumberOfWays()
getNumberOfWays
in interface OsmElementCounter
public long getNumberOfRelations()
getNumberOfRelations
in interface OsmElementCounter
public long getTotalNumberOfElements()
getTotalNumberOfElements
in interface OsmElementCounter
public long getNumberOfElements(EntityType type)
getNumberOfElements
in interface OsmElementCounter