Interface Edge

    • Method Detail

      • getGeometry

        org.locationtech.jts.geom.LineString getGeometry()
        Collect the geometry of this line
        Returns:
        lineString
      • setGeometry

        void setGeometry​(org.locationtech.jts.geom.LineString lineString)
        set the geometry of this link as a line string
        Parameters:
        lineString - to set
      • hasGeometry

        default boolean hasGeometry()
        check if geometry is available
        Returns:
        true when available, false otherwise
      • isGeometryInAbDirection

        default boolean isGeometryInAbDirection()
        verify if the geometry is in the A to B direction of the link
        Returns:
        true if in A to B direction, false otherwise
      • transformGeometry

        default void transformGeometry​(org.opengis.referencing.operation.MathTransform transformer)
                                throws org.opengis.geometry.MismatchedDimensionException,
                                       org.opengis.referencing.operation.TransformException
        transform the line string information of this edge using the passed in MathTransform
        Parameters:
        transformer - to apply
        Throws:
        org.opengis.geometry.MismatchedDimensionException - thrown if error
        org.opengis.referencing.operation.TransformException - thrown if error
      • removeVertex

        boolean removeVertex​(Vertex vertex)
        Remove vertex from edge
        Parameters:
        vertex - to remove
        Returns:
        true when successful false otherwise
      • getVertexA

        Vertex getVertexA()
        Vertex A of the edge
        Returns:
        vertex A
      • getVertexB

        Vertex getVertexB()
        Vertex B of the edge
        Returns:
        vertex B
      • setName

        void setName​(String name)
        set the name of the edge
        Parameters:
        name - to set
      • getName

        String getName()
        get the name of the edge
        Returns:
        name
      • setLengthKm

        void setLengthKm​(double lengthInKm)
        set length of this edge in km
        Parameters:
        lengthInKm - of this edge in km
      • getLengthKm

        double getLengthKm()
        Return length of this edge in km
        Returns:
        length of this edge in km
      • addInputProperty

        void addInputProperty​(String key,
                              Object value)
        Add a property from the original input that is not part of the readily available link members
        Parameters:
        key - (name) of input property
        value - of input property
      • getInputProperty

        Object getInputProperty​(String key)
        Get input property by its key
        Parameters:
        key - of input property
        Returns:
        value retrieved value of input property
      • replace

        boolean replace​(Vertex vertextoReplace,
                        Vertex vertexToReplaceWith)
                 throws PlanItException
        Replace one of the vertices of the link
        Parameters:
        vertextoReplace - the vertex to replace
        vertexToReplaceWith - the vertex to replace with
        Returns:
        true when replaced, false otherwise
        Throws:
        PlanItException - thrown if error
      • clone

        Edge clone()
        Clone the edge as is, all shared members are shallow copied, fully owned members are deep copied
        Returns:
        copy of this edge
      • validate

        boolean validate()
        validate the contents of this edge
        Returns:
        true when valid, false otherwise
      • hasVertex

        default boolean hasVertex​(Vertex vertex)
        check if vertex is present on the edge
        Parameters:
        vertex - to check
        Returns:
        true when present false otherwise