public final class Convert extends Object
Copyright (c) 2013-2017 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 |
|---|---|
org.opentrafficsim.road.network.lane.CrossSectionLink |
convertLink(org.opentrafficsim.core.network.Network network,
OSMLink link,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
This method converts an OSM link to an OTS link.
|
org.opentrafficsim.core.network.OTSNode |
convertNode(org.opentrafficsim.core.network.Network network,
OSMNode node)
This method converts an OSM node to an OTS node.
|
static OSMNetwork |
findSinksandSources(OSMNetwork net,
ProgressListener progressListener) |
(package private) static double |
laneWidth(LaneAttributes laneAttributes,
OSMLink link,
WarningListener warningListener)
Figure out a reasonable width for a lane.
|
List<org.opentrafficsim.road.network.lane.Lane> |
makeLanes(org.opentrafficsim.core.network.Network network,
OSMLink osmlink,
org.opentrafficsim.core.dsol.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 org.opentrafficsim.road.network.lane.LaneType |
makeLaneType(org.opentrafficsim.core.gtu.GTUType gtuType)
This method creates a LaneType which supports the specified GTUType.
|
static org.opentrafficsim.road.network.lane.LaneType |
makeLaneType(List<org.opentrafficsim.core.gtu.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 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 org.opentrafficsim.road.network.lane.CrossSectionLink convertLink(org.opentrafficsim.core.network.Network network,
OSMLink link,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
throws org.opentrafficsim.core.geometry.OTSGeometryException,
org.opentrafficsim.core.network.NetworkException
network - the networklink - OSM Link to be convertedsimulator - OTSDEVSSimulatorInterface; the simulator that will animate the generates lanes (if it happens to be an
instance of OTSAnimatorInterface)org.opentrafficsim.core.geometry.OTSGeometryException - on failureorg.opentrafficsim.core.network.NetworkException - 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 org.opentrafficsim.core.network.OTSNode convertNode(org.opentrafficsim.core.network.Network network,
OSMNode node)
throws org.opentrafficsim.core.network.NetworkException
network - the networknode - OSM Node to be convertedorg.opentrafficsim.core.network.NetworkException - if node already exists in the network, or if name of the node is not uniquestatic double laneWidth(LaneAttributes laneAttributes, OSMLink link, WarningListener warningListener)
laneAttributes - LaneAttributes; the attributes of the lanelink - OSMLink; the link that owns the lanewarningListener - WarningListener; the warning listener that receives warning eventspublic List<org.opentrafficsim.road.network.lane.Lane> makeLanes(org.opentrafficsim.core.network.Network network, OSMLink osmlink, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, WarningListener warningListener) throws org.opentrafficsim.core.network.NetworkException, NamingException, org.opentrafficsim.core.geometry.OTSGeometryException
network - the networkosmlink - 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 eventsorg.opentrafficsim.core.network.NetworkException - on network inconsistencyNamingException - on naming problems (in the animator)org.opentrafficsim.core.geometry.OTSGeometryException - when lane contour or center line cannot be instantiatedpublic static org.opentrafficsim.road.network.lane.LaneType makeLaneType(List<org.opentrafficsim.core.gtu.GTUType> gtuTypes)
gtuTypes - List<GTUType<String>>; list of GTUTypespublic static org.opentrafficsim.road.network.lane.LaneType makeLaneType(org.opentrafficsim.core.gtu.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–2018 Delft University of Technology. All rights reserved.