public final class Convert extends Object
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-09-16 19:20:07 +0200 (Wed, 16 Sep 2015) $, @version $Revision: 1405 $, by $Author: averbraeck $,
initial version 30.12.2014
| Constructor and Description |
|---|
Convert()
Construct a converter.
|
| Modifier and Type | Method and Description |
|---|---|
CrossSectionLink |
convertLink(Network network,
OSMLink link,
OTSSimulatorInterface simulator)
This method converts an OSM link to an OTS link.
|
OTSNode |
convertNode(Network network,
OSMNode node)
This method converts an OSM node to an OTS node.
|
static OSMNetwork |
findSinksandSources(OSMNetwork net,
ProgressListener progressListener) |
List<Lane> |
makeLanes(Network network,
OSMLink osmlink,
OTSSimulatorInterface simulator,
WarningListener warningListener)
This method creates lanes out of an OSM link LaneTypes are not yet extensive and can be further increased through Tags
provided by OSM.
|
static LaneType |
makeLaneType(GTUType gtuType)
This method creates a LaneType which supports the specified GTUType.
|
static LaneType |
makeLaneType(List<GTUType> gtuTypes)
This method creates a LaneType which supports all GTUTypes that have been specified in the GTUType List "GTUs".
|
String |
toString() |
static com.vividsolutions.jts.geom.Coordinate |
transform(com.vividsolutions.jts.geom.Coordinate c) |
public static com.vividsolutions.jts.geom.Coordinate transform(com.vividsolutions.jts.geom.Coordinate c)
throws FactoryException,
TransformException
c - Coordinate; Coordinate in WGS84FactoryException - on ???TransformException - on problems with the coordinate transformationpublic CrossSectionLink convertLink(Network network, OSMLink link, OTSSimulatorInterface simulator) throws OTSGeometryException, NetworkException
network - Network; the networklink - OSMLink; OSM Link to be convertedsimulator - OTSSimulatorInterface; the simulator that will animate the generates lanes (if it happens to be an
instance of AnimatorInterface)OTSGeometryException - on failureNetworkException - if link already exists in the network, if name of the link is not unique, or if the start node
or the end node of the link are not registered in the network.public OTSNode convertNode(Network network, OSMNode node) throws NetworkException
network - Network; the networknode - OSMNode; OSM Node to be convertedNetworkException - if node already exists in the network, or if name of the node is not uniquepublic List<Lane> makeLanes(Network network, OSMLink osmlink, OTSSimulatorInterface simulator, WarningListener warningListener) throws NetworkException, NamingException, OTSGeometryException
network - Network; the networkosmlink - Link OSMLink; the OSM link to make lanes forsimulator - OTSSimulatorInterface; the simulator that will animate the generates lanes (if it happens to be an
instance of AnimatorInterface)warningListener - WarningListener; the warning listener that will receive warning eventsNetworkException - on network inconsistencyNamingException - on naming problems (in the animator)OTSGeometryException - when lane contour or center line cannot be instantiatedpublic static LaneType makeLaneType(List<GTUType> gtuTypes)
gtuTypes - List<GTUType>; list of GTUTypespublic static LaneType makeLaneType(GTUType gtuType)
gtuType - GTUType; the type of GTU that can travel on the new LaneTypepublic static OSMNetwork findSinksandSources(OSMNetwork net, ProgressListener progressListener)
net - OSMNetwork; The OSM network which is to be searched for Sinks and Sources.progressListener - ProgressListener; the progress listener that will receive progress eventsCopyright © 2014–2019 Delft University of Technology. All rights reserved.