Class OSMParser

java.lang.Object
org.opentrafficsim.road.network.factory.osm.input.OSMParser
All Implemented Interfaces:
Serializable, AutoCloseable, org.openstreetmap.osmosis.core.lifecycle.Closeable, org.openstreetmap.osmosis.core.lifecycle.Completable, org.openstreetmap.osmosis.core.task.common.Task, org.openstreetmap.osmosis.core.task.v0_6.Initializable, org.openstreetmap.osmosis.core.task.v0_6.Sink

public class OSMParser
extends Object
implements org.openstreetmap.osmosis.core.task.v0_6.Sink, Serializable
Build a structure from the elements in an OSM file.

Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

$LastChangedDate: 2015-07-26 01:01:13 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1155 $, by $Author: averbraeck $, initial version 31 dec. 2014

Author:
Mingxin Zhang , Moritz Bergmann
See Also:
Serialized Form
  • Constructor Details

    • OSMParser

      public OSMParser​(List<OSMTag> wantedTags, List<String> filteredKeys)
      Construct a new OSMParser and set wantedTags and filteredKeys in one call.
      Parameters:
      wantedTags - List<OSMTag>; the list of wantedTags
      filteredKeys - List<String>; the list of filtered keys
  • Method Details

    • initialize

      public void initialize​(Map<String,​Object> arg0)
      Specified by:
      initialize in interface org.openstreetmap.osmosis.core.task.v0_6.Initializable
    • process

      public final void process​(org.openstreetmap.osmosis.core.container.v0_6.EntityContainer entityContainer)
      Specified by:
      process in interface org.openstreetmap.osmosis.core.task.v0_6.Sink
    • close

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

      public final void complete()
      Specified by:
      complete in interface org.openstreetmap.osmosis.core.lifecycle.Completable
    • getNetwork

      public final OSMNetwork getNetwork()
      Returns:
      the whole Network
    • setWantedTags

      public final void setWantedTags​(List<OSMTag> tags)
      Set/replace the list of wanted tags.
      This method makes a deep copy of the supplied list.
      Parameters:
      tags - List<OSMTag>; the list of wanted tags
    • setFilterKeys

      public final void setFilterKeys​(List<String> keys)
      Set/replace the filter keys.
      The provided list is not copied; the caller should not modify the list afterwards.
      Parameters:
      keys - List<String>; List<String> list of filter keys
    • getProgressListener

      public final ProgressListener getProgressListener()
      Returns:
      progressListener.
    • setProgressListener

      public final void setProgressListener​(ProgressListener progressListener)
      Parameters:
      progressListener - ProgressListener; set progressListener.
    • toString

      public String toString()
      Overrides:
      toString in class Object