Interface Vertex

    • Method Detail

      • addInputProperty

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

        void setPosition​(org.locationtech.jts.geom.Point position)
        Set the center point geometry for a vertex
        Parameters:
        position - the center point for a vertex
      • getPosition

        org.locationtech.jts.geom.Point getPosition()
        Collect the geometry of the point location of this vertex
        Returns:
        direct position reflecting point location
      • addEdge

        boolean addEdge​(Edge edge)
        Add edge, do not invoke when parsing networks, this connection is auto-populated before the assignment starts based on the edge and its two vertices that have been registered.
        Parameters:
        edge - Edge to be added
        Returns:
        true when added, false when already present (and not added)
      • removeEdge

        boolean removeEdge​(Edge edge)
        Remove edge
        Parameters:
        edge - Edge to be removed
        Returns:
        true when removed, false when not present (and not removed)
      • removeEdge

        boolean removeEdge​(long edgeId)
        Remove edge
        Parameters:
        edgeId - Edge to be removed
        Returns:
        true when removed, false when not present (and not removed)
      • getEdges

        Collection<? extends Edge> getEdges()
        Returns a collection of Edge objects
        Returns:
        Set of Edge objects
      • getNumberOfEdges

        int getNumberOfEdges()
        Number of entries in edge segments
        Returns:
        the number of edges connected to this vertex
      • getEdges

        Set<Edge> getEdges​(Vertex otherVertex)
        colect the edge(s) based on the other vertex
        Parameters:
        otherVertex - that defines the edge(s)
        Returns:
        edges for which this holds, if none hold an empty set is returned
      • clone

        Vertex clone()
        Clone the vertex
        Returns:
        the cloned vertex
      • validate

        boolean validate()
        validate the vertex regarding it connections to edges etc.
        Returns:
        true when valid, false otherwise
      • replace

        default boolean replace​(Edge edgeToReplace,
                                Edge edgeToReplaceWith,
                                boolean forceInsert)
        replace one edge with the other
        Parameters:
        edgeToReplace - one to replace
        edgeToReplaceWith - one to replace it with
        forceInsert - when true the replacement will be added event is original cannot be found, when false not
        Returns:
        successful replacement/insert when true, false otherwise
      • transformPosition

        default void transformPosition​(org.opengis.referencing.operation.MathTransform transformer)
                                throws org.opengis.geometry.MismatchedDimensionException,
                                       org.opengis.referencing.operation.TransformException
        transform the position information of this vertex 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