org.openstreetmap.osmosis.core.filter.v0_5
Class PolygonFilter
java.lang.Object
org.openstreetmap.osmosis.core.filter.v0_5.AreaFilter
org.openstreetmap.osmosis.core.filter.v0_5.PolygonFilter
- All Implemented Interfaces:
- EntityProcessor, Completable, Releasable, Task, Sink, SinkSource, Source
public class PolygonFilter
- extends AreaFilter
Provides a filter for extracting all entities that lie within a specific
geographical box identified by latitude and longitude coordinates.
- Author:
- Brett Henderson
Constructor Summary |
PolygonFilter(IdTrackerType idTrackerType,
java.io.File polygonFile,
boolean completeWays,
boolean completeRelations)
Creates a new instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PolygonFilter
public PolygonFilter(IdTrackerType idTrackerType,
java.io.File polygonFile,
boolean completeWays,
boolean completeRelations)
- Creates a new instance.
- Parameters:
idTrackerType
- Defines the id tracker implementation to use.polygonFile
- The file containing the polygon coordinates.completeWays
- Include all nodes for ways which have at least one node inside the filtered area.completeRelations
- Include all relations referenced by other relations which have members inside
the filtered area.
process
public void process(BoundContainer boundContainer)
- Process the bound.
- Specified by:
process
in interface EntityProcessor
- Overrides:
process
in class AreaFilter
- Parameters:
boundContainer
- The bound to be processed.
isNodeWithinArea
protected boolean isNodeWithinArea(Node node)
- Indicates if the node lies within the area required.
- Specified by:
isNodeWithinArea
in class AreaFilter
- Parameters:
node
- The node to be checked.
- Returns:
- True if the node lies within the area.