Class OSMParser
- java.lang.Object
-
- org.opentrafficsim.road.network.factory.osm.input.OSMParser
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.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 java.lang.Object implements org.openstreetmap.osmosis.core.task.v0_6.Sink, java.io.SerializableBuild 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcomplete()OSMNetworkgetNetwork()ProgressListenergetProgressListener()voidinitialize(java.util.Map<java.lang.String,java.lang.Object> arg0)voidprocess(org.openstreetmap.osmosis.core.container.v0_6.EntityContainer entityContainer)voidsetFilterKeys(java.util.List<java.lang.String> keys)Set/replace the filter keys.
The provided list is not copied; the caller should not modify the list afterwards.voidsetProgressListener(ProgressListener progressListener)voidsetWantedTags(java.util.List<OSMTag> tags)Set/replace the list of wanted tags.
This method makes a deep copy of the supplied list.java.lang.StringtoString()
-
-
-
Constructor Detail
-
OSMParser
public OSMParser(java.util.List<OSMTag> wantedTags, java.util.List<java.lang.String> filteredKeys)
Construct a new OSMParser and set wantedTags and filteredKeys in one call.- Parameters:
wantedTags- List<OSMTag>; the list of wantedTagsfilteredKeys- List<String>; the list of filtered keys
-
-
Method Detail
-
initialize
public void initialize(java.util.Map<java.lang.String,java.lang.Object> arg0)
- Specified by:
initializein interfaceorg.openstreetmap.osmosis.core.task.v0_6.Initializable
-
process
public final void process(org.openstreetmap.osmosis.core.container.v0_6.EntityContainer entityContainer)
- Specified by:
processin interfaceorg.openstreetmap.osmosis.core.task.v0_6.Sink
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceorg.openstreetmap.osmosis.core.lifecycle.Closeable
-
complete
public final void complete()
- Specified by:
completein interfaceorg.openstreetmap.osmosis.core.lifecycle.Completable
-
getNetwork
public final OSMNetwork getNetwork()
- Returns:
- the whole Network
-
setWantedTags
public final void setWantedTags(java.util.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(java.util.List<java.lang.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 java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-