Package org.geotools.map
Class RasterLayer
Object
Layer
StyleLayer
RasterLayer
- Direct Known Subclasses:
GridCoverageLayer,GridReaderLayer
Layer responsible for raster content.
- Since:
- 8.0
- Author:
- Jody Garnett
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SimpleFeatureSourceSimpleFeatureSource used to provide the outline of the raster content.Fields inherited from class StyleLayer
style -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Allows a Layer to clean up any listeners, or internal caches or resources it has added during use.FetureSource representation of raster contents (in case a vector based renderer wishes to draw a polygon outline).abstract SimpleFeatureCollectionSupply a FeatureCollection indicating where the raster is located, we ask that the features use the same coordinate reference system as your raster data and form an outline or foot print of the information you have available.Methods inherited from class StyleLayer
getStyle, setStyleMethods inherited from class Layer
addMapLayerListener, connectDataListener, finalize, fireMapLayerListenerLayerChanged, fireMapLayerListenerLayerDeselected, fireMapLayerListenerLayerHidden, fireMapLayerListenerLayerPreDispose, fireMapLayerListenerLayerSelected, fireMapLayerListenerLayerShown, getBounds, getQuery, getTitle, getUserData, isSelected, isVisible, preDispose, removeMapLayerListener, setSelected, setTitle, setVisible, toString
-
Field Details
-
source
SimpleFeatureSource used to provide the outline of the raster content. Created in a lazy fashion by getFeatureSource().
-
-
Constructor Details
-
RasterLayer
-
RasterLayer
-
-
Method Details
-
getFeatureSource
FetureSource representation of raster contents (in case a vector based renderer wishes to draw a polygon outline).This method uses
to wrap up the result of {@link #toFeatureCollection()}- Overrides:
getFeatureSourcein classLayer- Returns:
- The features for this layer, or an an empty ArrayFeatureSource if not available.
-
dispose
public void dispose()Description copied from class:LayerAllows a Layer to clean up any listeners, or internal caches or resources it has added during use.- Overrides:
disposein classStyleLayer
-
toFeatureCollection
Supply a FeatureCollection indicating where the raster is located, we ask that the features use the same coordinate reference system as your raster data and form an outline or foot print of the information you have available.This is an interesting method for a RasterLayer to have; some of the rendering systems are willing to render your raster content as an outline; for this to work they need this method to supply a feature collection indicating where the content is located. The information may also be used to determine if any of your raster content is on screen (and thus needs to be rendered).
Note this is a feature collection to allow for raster content that contains more than one image; and is not based bounding boxes (as sometimes rasters are rotated or stretched into position).
You may find the
FeatureUtilitiesuseful in wrapping up your raster content.- Returns:
- SimpleFeatureCollection indicating the location of raster content
-