Class ExtendedCrossSectionLink

    • Constructor Detail

      • ExtendedCrossSectionLink

        public ExtendedCrossSectionLink​(OTSRoadNetwork network,
                                        String id,
                                        OTSRoadNode startNode,
                                        OTSRoadNode endNode,
                                        LinkType linkType,
                                        OTSLine3D designLine,
                                        OTSSimulatorInterface simulator,
                                        LaneKeepingPolicy laneKeepingPolicy)
                                 throws NetworkException
        Construction of a cross section link with some extra data.
        Parameters:
        network - OTSRoadNetwork; the network
        id - String; the link id.
        startNode - OTSRoadNode; the start node (directional).
        endNode - OTSRoadNode; the end node (directional).
        linkType - LinkType; the link type
        designLine - OTSLine3D; the design line of the Link
        simulator - OTSSimulatorInterface; the simulator on which events can be scheduled
        laneKeepingPolicy - LaneKeepingPolicy; the policy to generally keep left, keep right, or keep lane
        Throws:
        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.
    • Method Detail

      • addFeature

        public void addFeature​(String key,
                               Feature feature)
        Add a feature.
        Parameters:
        key - String; identifies the database / shape file from which this feature was retrieved
        feature - Feature; the feature
      • getFeatures

        public Map<String,​Feature> getFeatures()
        Retrieve the feature map.
        Returns:
        List<Feature>; the feature map