public final class Convert extends Object
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-08-29 13:54:21 +0200 (Sat, 29 Aug 2015) $, @version $Revision: 1320 $, by $Author: averbraeck $,
initial version 30.12.2014
| Constructor and Description |
|---|
Convert()
Construct a converter.
|
| Modifier and Type | Method and Description |
|---|---|
CrossSectionLink |
convertLink(OSMLink link)
This method converts an OSM link to an OTS link.
|
OTSNode |
convertNode(OSMNode node)
This method converts an OSM node to an OTS node.
|
static OSMNetwork |
findSinksandSources(OSMNetwork net,
ProgressListener progressListener) |
List<Lane> |
makeLanes(OSMLink osmlink,
OTSDEVSSimulatorInterface 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".
|
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 org.opengis.referencing.FactoryException,
org.opengis.referencing.operation.TransformException
c - Coordinate in WGS84org.opengis.referencing.FactoryException - on ???org.opengis.referencing.operation.TransformException - on problems with the coordinate transformationpublic CrossSectionLink convertLink(OSMLink link)
link - OSM Link to be convertedpublic OTSNode convertNode(OSMNode node)
node - OSM Node to be convertedpublic List<Lane> makeLanes(OSMLink osmlink, OTSDEVSSimulatorInterface simulator, WarningListener warningListener) throws NetworkException, RemoteException, NamingException, OTSGeometryException
osmlink - Link OSMLink; the OSM link to make lanes forsimulator - OTSDEVSSimulatorInterface; the simulator that will animate the generates lanes (if it happens to be an
instance of OTSAnimatorInterface)warningListener - WarningListener; the warning listener that will receive warning eventsNetworkException - on network inconsistencyNamingException - on naming problems (in the animator)RemoteException - on communications failureOTSGeometryException - when lane contour or center line cannot be instantiatedpublic static LaneType makeLaneType(List<GTUType> gtuTypes)
gtuTypes - List<GTUType<String>>; 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 - The OSM network which is to be searched for Sinks and Sources.progressListener - ProgressListener; the progress listener that will receive progress eventsCopyright © 2014–2015 Delft University of Technology. All rights reserved.