Class VectorDataNode

    • Constructor Detail

      • VectorDataNode

        public VectorDataNode​(String name,
                              org.opengis.feature.simple.SimpleFeatureType featureType)
        Constructs a new vector data node for the given feature type.
        Parameters:
        name - The node name.
        featureType - The feature type.
        Throws:
        IllegalArgumentException - if the given name is not a valid node identifier
      • VectorDataNode

        public VectorDataNode​(String name,
                              org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,​org.opengis.feature.simple.SimpleFeature> featureCollection)
        Constructs a new vector data node for the given feature collection.
        Parameters:
        name - The node name.
        featureCollection - A feature collection. A copy of this collection will be used. This collection instance is not modified.
        Throws:
        IllegalArgumentException - if the given name is not a valid node identifier
      • VectorDataNode

        public VectorDataNode​(String name,
                              org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,​org.opengis.feature.simple.SimpleFeature> featureCollection,
                              PlacemarkDescriptor placemarkDescriptor)
        Constructs a new vector data node for the given feature collection and placemark descriptor.
        Parameters:
        name - The node name.
        featureCollection - A feature collection. A copy of this collection will be used. This collection instance is not modified.
        placemarkDescriptor - The placemark descriptor
        Throws:
        IllegalArgumentException - if the given name is not a valid node identifier
    • Method Detail

      • setOwner

        public void setOwner​(ProductNode owner)
        Called when this node is added to or removed from a product. Overridden in order to create placemarks for features that are still without a placemark counterpart.
        Overrides:
        setOwner in class ProductNode
        Parameters:
        owner - the new owner
      • getFeatureType

        public org.opengis.feature.simple.SimpleFeatureType getFeatureType()
        Returns:
        The feature type (= feature source schema).
      • getFeatureCollection

        public org.geotools.feature.DefaultFeatureCollection getFeatureCollection()
        Returns:
        The feature collection.
      • getEnvelope

        public org.geotools.geometry.jts.ReferencedEnvelope getEnvelope()
        Gets the bounding box for the features in this feature collection.
        Returns:
        the envelope of the geometries contained by this feature collection.
      • getRawStorageSize

        public long getRawStorageSize​(ProductSubsetDef subsetDef)
        Description copied from class: ProductNode
        Gets an estimated, raw storage size in bytes of this product node.
        Specified by:
        getRawStorageSize in class ProductNode
        Parameters:
        subsetDef - if not null the subset may limit the size returned
        Returns:
        the size in bytes.
      • getDefaultStyleCss

        public String getDefaultStyleCss()
      • setDefaultStyleCss

        public void setDefaultStyleCss​(String defaultStyleCss)
      • getStyleCss

        public String getStyleCss()
      • setStyleCss

        public void setStyleCss​(String styleCss)
      • acceptVisitor

        public void acceptVisitor​(ProductVisitor visitor)
        Description copied from class: ProductNode
        Accepts the given visitor. This method implements the well known 'Visitor' design pattern of the gang-of-four. The visitor pattern allows to define new operations on the product data model without the need to add more code to it. The new operation is implemented by the visitor.
        Specified by:
        acceptVisitor in class ProductNode
        Parameters:
        visitor - the visitor
      • isPermanent

        public boolean isPermanent()
        Internal API. Don't use.
        Returns:
        If true, prevents this node from being removed.
      • setPermanent

        public void setPermanent​(boolean permanent)
        Internal API. Don't use.
        Parameters:
        permanent - If true, prevents this node from being removed.
      • isInternalNode

        @Deprecated
        public boolean isInternalNode()
        Deprecated.
        Since BEAM 4.10. No use.
        Returns:
        true if the feature type's name starts with "org.esa.snap."
      • getDefaultCSS

        @Deprecated
        public String getDefaultCSS()
        Deprecated.
        since BEAM 4.10, use getDefaultStyleCss()
      • setDefaultCSS

        @Deprecated
        public void setDefaultCSS​(String defaultCSS)
        Deprecated.
        since BEAM 4.10, use setDefaultStyleCss()
      • fireFeaturesAdded

        @Deprecated
        public void fireFeaturesAdded​(org.opengis.feature.simple.SimpleFeature... features)
        Deprecated.
        since 6.0, method is public by accident, should only be used internally
        Informs clients which have registered a ProductNodeListener with the Product containing this VectorDataNode, that one or more OpenGIS SimpleFeatures have been added to the underlying FeatureCollection.

        The method fires a product node property change event, where the propertyName is PROPERTY_NAME_FEATURE_COLLECTION, the oldValue is null, and the newValue is the array of features added.

        Parameters:
        features - The feature(s) added.
      • fireFeaturesRemoved

        @Deprecated
        public void fireFeaturesRemoved​(org.opengis.feature.simple.SimpleFeature... features)
        Deprecated.
        since 6.0, method is public by accident, should only be used internally
        Informs clients which have registered a ProductNodeListener with the Product containing this VectorDataNode, that one or more OpenGIS SimpleFeatures have been removed from the underlying FeatureCollection.

        The method fires a product node property change event, where the propertyName is PROPERTY_NAME_FEATURE_COLLECTION, the oldValue is the array of features removed, and the newValue is null.

        Parameters:
        features - The feature(s) removed.
      • fireFeaturesChanged

        public void fireFeaturesChanged​(org.opengis.feature.simple.SimpleFeature... features)
        Deprecated.
        since 6.0, method is public by accident, should only be used internally
        Informs clients which have registered a ProductNodeListener with the Product containing this VectorDataNode, that one or more OpenGIS SimpleFeatures from from the underlying FeatureCollection have been changed.

        The method fires a product node property change event, where the propertyName is PROPERTY_NAME_FEATURE_COLLECTION, and both oldValue and newValue are the same array of features changed.

        Parameters:
        features - The feature(s) changed.