Class CentroidVertexImpl

    • Constructor Detail

      • CentroidVertexImpl

        protected CentroidVertexImpl​(IdGroupingToken groupId,
                                     Centroid parentCentroid)
        Constructor
        Parameters:
        groupId - for id generation
        parentCentroid - parent centroid this vertex represents on its layer
      • CentroidVertexImpl

        protected CentroidVertexImpl​(DirectedVertexImpl<ConnectoidSegment> other,
                                     boolean deepCopy)
        Copy constructor
        Parameters:
        other - to copy
        deepCopy - when true perform deep copy, when false do not
    • Method Detail

      • getPosition

        public org.locationtech.jts.geom.Point getPosition()
        position of centroid vertex. When not explicitly set it is collected from its parent. If parent centroid and its own position differ, a warning is issued
        Specified by:
        getPosition in interface Vertex
        Overrides:
        getPosition in class VertexImpl<Edge>
        Returns:
        centroid position
      • setPosition

        public void setPosition​(org.locationtech.jts.geom.Point position)
        Position cannot be altered on centroid vertex when centroid that it is related to has already a position defined. Only when centroid's position has no meaning, i.e., it is not set, one can assign a unique position to each centroid vertex related to this centroid.
        Specified by:
        setPosition in interface Vertex
        Overrides:
        setPosition in class VertexImpl<Edge>
        Parameters:
        position - to set