Interface NFESpatialModel

  • All Known Implementing Classes:
    NFERTreeSpatialModel

    public interface NFESpatialModel
    An NFE component that maintains spatial indexes for all the elements with geometry contained in an NFE model.
    • Method Detail

      • addNetworkElementIndex

        boolean addNetworkElementIndex​(NFENetworkElement netElem)
        Spatially-indexes a network element
        Parameters:
        netElem - a network element instance
        Returns:
        true if the element could be indexed
      • refreshNetworkElementIndex

        boolean refreshNetworkElementIndex​(NFENetworkElement netElem)
        Refreshes the spatial index of the network element to reflect its actual geometry. It should be called whenever the element's geometry changes.
        Parameters:
        netElem - a network element instance
        Returns:
        true if the index could be refreshed.
      • removeNetworkElementIndex

        boolean removeNetworkElementIndex​(NFENetworkElement netElem)
        Removes the index for the network element
        Parameters:
        netElem - a network element instance
        Returns:
        true if the index was removed.
      • getNetworkElements

        java.util.Collection<NFENetworkElement> getNetworkElements​(java.awt.geom.Point2D point,
                                                                   double tolerance)
        Gets all the network elements interacting with the given point.
        Parameters:
        point - a spatial point in moodel's coordinate system
        tolerance - the maximum distance an element can be from the target geometry to be considered in the result.
        Returns:
        a collection containing all the network elements interacting with the point
      • getNetworkElements

        java.util.Collection<NFENetworkElement> getNetworkElements​(java.awt.geom.Rectangle2D rect)
        Gets all the network elements interacting with the given rectangle.
        Parameters:
        rect - a rectangle in model's coordinate system
        Returns:
        a collection containing all the network elements interacting with the rectangle
      • getNetworkElements

        java.util.Collection<NFENetworkElement> getNetworkElements​(java.awt.geom.Area area)
        Gets all the network elements interacting with the given area.
        Parameters:
        area - an area in model's coordinate system
        Returns:
        a collection containing all the network elements interacting with the area
      • getFeatureElements

        java.util.Collection<NFEFeatureElement> getFeatureElements​(java.awt.geom.Point2D point,
                                                                   double tolerance)
        Gets all the feature elements interacting with the given point.
        Parameters:
        point - a spatial point in moodel's coordinate system
        tolerance - the maximum distance an element can be from the target geometry to be considered in the result.
        Returns:
        a collection containing all the feature elements interacting with the point
      • getFeatureElements

        java.util.Collection<NFEFeatureElement> getFeatureElements​(java.awt.geom.Rectangle2D rect)
        Gets all the feature elements interacting with the given rectangle.
        Parameters:
        rect - a rectangle in model's coordinate system
        Returns:
        a collection containing all the feature elements interacting with the rectangle
      • getFeatureElements

        java.util.Collection<NFEFeatureElement> getFeatureElements​(java.awt.geom.Area area)
        Gets all the feature elements interacting with the given area.
        Parameters:
        area - an area in model's coordinate system
        Returns:
        a collection containing all the feature elements interacting with the area
      • getFeatureElements

        java.util.Collection<NFEFeatureElement> getFeatureElements​(java.awt.geom.Point2D point,
                                                                   double tolerance,
                                                                   long featLayerId)
        Gets all the feature elements interacting with the given point. Only the elements that belong to the given feature layer are retrieved.
        Parameters:
        point - a spatial point in moodel's coordinate system
        tolerance - the maximum distance an element can be from the target geometry to be considered in the result.
        featLayerId - only feature elements from this feature layer are returned.
        Returns:
        a collection containing all the feature elements interacting with the point
      • getFeatureElements

        java.util.Collection<NFEFeatureElement> getFeatureElements​(java.awt.geom.Rectangle2D rect,
                                                                   long featLayerId)
        Gets all the feature elements interacting with the given rectangle. Only the elements that belong to the given feature layer are retrieved.
        Parameters:
        rect - a rectangle in model's coordinate system
        featLayerId - only feature elements from this feature layer are returned.
        Returns:
        a collection containing all the feature elements interacting with the rectangle
      • getFeatureElements

        java.util.Collection<NFEFeatureElement> getFeatureElements​(java.awt.geom.Area area,
                                                                   long featLayerId)
        Gets all the feature elements interacting with the given area. Only the elements that belong to the given feature layer are retrieved.
        Parameters:
        area - an area in model's coordinate system
        featLayerId - only feature elements from this feature layer are returned.
        Returns:
        a collection containing all the feature elements interacting with the area