Class TopologicalLayerNetwork<T extends TopologicalLayer,​U extends TopologicalLayers<T>>

    • Constructor Detail

      • TopologicalLayerNetwork

        public TopologicalLayerNetwork​(IdGroupingToken tokenId)
        Default constructor
        Parameters:
        tokenId - to use for id generation
      • TopologicalLayerNetwork

        public TopologicalLayerNetwork​(IdGroupingToken tokenId,
                                       org.opengis.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem)
        Default constructor
        Parameters:
        tokenId - to use for id generation
        coordinateReferenceSystem - preferred coordinate reference system to use
      • TopologicalLayerNetwork

        protected TopologicalLayerNetwork​(TopologicalLayerNetwork<T,​U> other,
                                          boolean deepCopy,
                                          ManagedIdDeepCopyMapper<Mode> modeMapper,
                                          ManagedIdDeepCopyMapper<T> layerMapper)
        Copy constructor. Beware shallow copy only for managed id containers.
        Parameters:
        other - to copy
        deepCopy - when true, create a deep copy, shallow copy otherwise
        modeMapper - to use for tracking mapping between original and copied modes
        layerMapper - to use for tracking mapping between original and copied layers
    • Method Detail

      • getCoordinateReferenceSystem

        public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
        collect the used crs
        Returns:
        coordinateReferencesystem used by this infrastructure network
      • setCoordinateReferenceSystem

        public void setCoordinateReferenceSystem​(org.opengis.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem)
        set the coordinate reference system used for all layers
        Parameters:
        coordinateReferenceSystem - to set
      • transform

        public void transform​(org.opengis.referencing.crs.CoordinateReferenceSystem newCoordinateReferenceSystem)
                       throws PlanItException
        change the coordinate system, which will result in an update of all geometries in the network layers from the original CRS to the new CRS. If the network is empty and no CRS is set then this is identical to calling setCoordinateReferenceSystem, otherwise it will change the CRS while the set method will throw an exception
        Parameters:
        newCoordinateReferenceSystem - to transform the network to
        Throws:
        PlanItException - thrown if error
      • createBoundingBox

        public org.locationtech.jts.geom.Envelope createBoundingBox()
        Based on the underlying layer geographies construct a rectangular bounding box reflecting the extremities of the network. Note this is created from scratch with every call, so for large networks this is a costly operation
        Returns:
        bounding box envelope