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 Summary
-
Method Summary
Modifier and Type Method Description voidclose()voidcomplete()OSMNetworkgetNetwork()ProgressListenergetProgressListener()voidinitialize(Map<String,Object> arg0)voidprocess(org.openstreetmap.osmosis.core.container.v0_6.EntityContainer entityContainer)voidsetFilterKeys(List<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(List<OSMTag> tags)Set/replace the list of wanted tags.
This method makes a deep copy of the supplied list.StringtoString()
-
Constructor Details
-
OSMParser
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 Details
-
initialize
- 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 interfaceAutoCloseable- Specified by:
closein interfaceorg.openstreetmap.osmosis.core.lifecycle.Closeable
-
complete
public final void complete()- Specified by:
completein interfaceorg.openstreetmap.osmosis.core.lifecycle.Completable
-
getNetwork
- Returns:
- the whole Network
-
setWantedTags
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
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
- Returns:
- progressListener.
-
setProgressListener
- Parameters:
progressListener- ProgressListener; set progressListener.
-
toString
-