Class DatasetBoundingBoxFilter

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.openstreetmap.osmosis.core.lifecycle.Closeable, org.openstreetmap.osmosis.core.task.common.Task, org.openstreetmap.osmosis.core.task.v0_6.DatasetSink, org.openstreetmap.osmosis.core.task.v0_6.DatasetSinkSource, org.openstreetmap.osmosis.core.task.v0_6.Source

    public class DatasetBoundingBoxFilter
    extends java.lang.Object
    implements org.openstreetmap.osmosis.core.task.v0_6.DatasetSinkSource
    Provides a filter utilising a dataset to extract all entities that lie within a specific geographical box identified by latitude and longitude coordinates.
    • Constructor Summary

      Constructors 
      Constructor Description
      DatasetBoundingBoxFilter​(double left, double right, double top, double bottom, boolean completeWays)
      Creates a new instance with the specified geographical coordinates.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      void process​(org.openstreetmap.osmosis.core.container.v0_6.Dataset dataset)
      void setSink​(org.openstreetmap.osmosis.core.task.v0_6.Sink sink)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DatasetBoundingBoxFilter

        public DatasetBoundingBoxFilter​(double left,
                                        double right,
                                        double top,
                                        double bottom,
                                        boolean completeWays)
        Creates a new instance with the specified geographical coordinates. When filtering, nodes right on the left and bottom edges of the box will be included, nodes on the top and right edges will be excluded.
        Parameters:
        left - The longitude marking the left edge of the bounding box.
        right - The longitude marking the right edge of the bounding box.
        top - The latitude marking the top edge of the bounding box.
        bottom - The latitude marking the bottom edge of the bounding box.
        completeWays - Include all nodes for ways which have some portion inside the filtered area.
    • Method Detail

      • setSink

        public void setSink​(org.openstreetmap.osmosis.core.task.v0_6.Sink sink)
        Specified by:
        setSink in interface org.openstreetmap.osmosis.core.task.v0_6.Source
      • process

        public void process​(org.openstreetmap.osmosis.core.container.v0_6.Dataset dataset)
        Specified by:
        process in interface org.openstreetmap.osmosis.core.task.v0_6.DatasetSink
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface org.openstreetmap.osmosis.core.lifecycle.Closeable