Package org.openjump.core.rasterimage
Class RasterImageLayer
- java.lang.Object
-
- com.vividsolutions.jump.workbench.model.AbstractLayerable
-
- com.vividsolutions.jump.workbench.model.GeoReferencedLayerable
-
- org.openjump.core.rasterimage.RasterImageLayer
-
- All Implemented Interfaces:
Disposable,Layerable,LayerManagerProxy,ObjectContainingMetaInformation
public final class RasterImageLayer extends GeoReferencedLayerable implements ObjectContainingMetaInformation, Disposable
Layer representing a georeferenced raster image (e.g. an areal photography) in OpenJump.- Version:
- $Rev: 2509 $ modified: [sstein]: 16.Feb.2009 changed logger-entries to comments, used frame.warnUser
- Author:
- Ole Rahn
FH Osnabrück - University of Applied Sciences Osnabrück,
Project: PIROL (2006),
Subproject: Daten- und Wissensmanagement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRasterImageLayer.RasterDataNotFoundException
-
Field Summary
Fields Modifier and Type Field Description protected doubleactualCellSizeprotected org.locationtech.jts.geom.EnvelopeactualImageEnvelopeprotected static longavailRAMprotected booleanfiringAppearanceEventsFlag to decide, if events are fired automatically, if the appearance (imageEnvelope, etc.) changes.
default: trueprotected static doublefreeRamFactorprotected BufferedImageimageprotected StringimageFileNameprotected RectangleimagePartprotected booleanimageSetprotected intlastImgProcessingModeprotected static intmaxPixelsForFastDisplayModeprotected MetaDataMapmetaInformationprotected static doubleminRamToKeepFreeprotected static intMODE_CLIPPINGFIRSTprotected static intMODE_FASTDISPLAYprotected static intMODE_NONEprotected static intMODE_SCALINGFIRSTprotected booleanneedToKeepImageFlag to control if the image should be deleted from RAM as soon as possible to save RAM or if it should be kept e.g.protected doublenoDataValueprotected intnumBandsprotected doubleoldScaleXImg2Canvasprotected org.locationtech.jts.geom.EnvelopeoldVisibleEnvprotected intorigImageHeightprotected intorigImageWidthprotected doubleoriginalCellSizeprotected booleanrasterDataChangedprotected BufferedImagescaledBufferedImageprotected booleantransparencyColorNeedsToBeAppliedprotected doubletransparencyLevelprotected ColortransparentColorprotected org.locationtech.jts.geom.EnvelopevisibleEnvprotected RectanglevisibleRectprotected intxOffsetprotected intyOffset
-
Constructor Summary
Constructors Constructor Description RasterImageLayer()for java2xmlRasterImageLayer(String name, LayerManager layerManager, BufferedImage imageToDisplay, Raster newRaster, org.locationtech.jts.geom.Envelope wholeImageEnvelope)Constructor to be used in case the image was not loaded from a file, so there is no file name, but an imageRasterImageLayer(String name, LayerManager layerManager, String imageFileName, BufferedImage imageToDisplay, org.locationtech.jts.geom.Envelope wholeImageEnvelope)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanclearImageAndRaster(boolean garbageCollect)Deletes image from RAM (if it is not to be kept and if the RAM consumption is high) and calls the garbage collector, ifgarbageCollectis true.Objectclone()BufferedImagecreateImage(LayerViewPanel layerViewPanel)Creates the image to drawprotected BufferedImagecreateOneColorImage(Color color)Create a single color image in the case where a single image pixel is visiblevoiddispose()protected voidfinalize()voidflushImages(boolean garbageCollect)flushes all images from the RAM.protected voidforceTotalRepaint()After this method was invoked, the image will be completely re-rendered (not using caches) the next time.org.locationtech.jts.geom.EnvelopegetActualImageEnvelope()org.locationtech.jts.geom.GeometrygetActualImageEnvelopeAsGeometry()RastergetActualRasterData()static longgetAvailRAM()DoublegetCellValue(double coordX, double coordY, int band)DoublegetCellValue(int col, int row, int band)DoublegetCellValue(org.locationtech.jts.geom.Coordinate coordinate, int band)protected longgetCommittedMemory()RectanglegetDrawingRectangle(double imgWidth, double imgHeight, org.locationtech.jts.geom.Envelope imageEnv, Viewport viewport)StringgetFilePath()static doublegetFreeRamFactor()BufferedImagegetImage()StringgetImageFileName()BufferedImagegetImageForDisplay(LayerViewPanel layerViewPanel)returns the image, this can be modified - i.e.static intgetMaxPixelsForFastDisplayMode()MetadatagetMetadata()MetaDataMapgetMetaInformation()static doublegetMinRamToKeepFree()doublegetNoDataValue()Default value is NaN.intgetNumBands()TODO: sstein test - 25.Sept.2013intgetOrigImageHeight()intgetOrigImageWidth()RastergetRasterData(Rectangle subset)RectanglegetRectangleFromEnvelope(org.locationtech.jts.geom.Envelope envelope)protected BufferedImagegetScaledImageMatchingVisible(BufferedImage toBeScaled, double XscaleImg2Canvas, double YscaleImg2Canvas)RasterSymbologygetSymbology()doublegetTransparencyLevel()Returns the transparency level of the image.ColorgetTransparentColor()Gets the color which will be drawn with a zero opacity in the Jump mapStringgetTransparentColorAsString()for java2xmlUUIDgetUUID()static RectanglegetViewportRectangle(WorkbenchContext workbenchContext)protected RectanglegetVisibleImageCoordinatesOfImage(double imgWidth, double imgHeight, org.locationtech.jts.geom.Envelope viewportEnv, org.locationtech.jts.geom.Envelope imageEnv)Returns the visible part of the image in image coordinateprotected RectanglegetVisibleImageCoordinatesOfImage(BufferedImage img, org.locationtech.jts.geom.Envelope visible, org.locationtech.jts.geom.Envelope imageEnv)protected BufferedImagegetVisiblePartOfTheImage(BufferedImage img, Rectangle desiredImageArea)org.locationtech.jts.geom.EnvelopegetWholeImageEnvelope()org.locationtech.jts.geom.GeometrygetWholeImageEnvelopeAsGeometry()Method to change the coordinates of the image and later apply the changes to the RasterImageLayer by usingsetGeometryAsWholeImageEnvelope(Geometry).StringgetXmlActualImageEnvelope()StringgetXmlEnvelope()for java2xmlStringgetXmlWholeImageEnvelope()for java2xmlintgetXOffset()intgetYOffset()booleanisFiringAppearanceEvents()booleanisImageNull()booleanisImageSet()booleanisNeedToKeepImage()check, if image will be kept in RAM or if it will be reloaded from a file if neededbooleanisNoData(double value)booleanisRasterDataChanged()booleanisSpatiallyConsistentWith(RasterImageLayer rasterImageLayer)Check if the RasteImageLayer is spatially consistent with another: both have the same cell size both have the same dimension (same width and height) both overlap to each other into the geographic spacebooleanisTemporaryLayer()Check if selected sextante raster layer is Temporary layer Both layers in memory and layes stored into TEMP folder are considered as "Temporary layers"static BufferedImagemakeBufferedImage(Image im)creates a BufferedImage out of an ImagevoidreLoadImage(LayerViewPanel layerViewPanel)protected BufferedImagescaleImage(BufferedImage im, float xScale, float yScale)apply a scale operation to the image and return the new image.voidsetFiringAppearanceEvents(boolean firingAppearanceEvents)static voidsetFreeRamFactor(double freeRamFactor)voidsetGeometryAsActualImageEnvelope(org.locationtech.jts.geom.Geometry geometry)voidsetGeometryAsWholeImageEnvelope(org.locationtech.jts.geom.Geometry geometry)Method to set the coordinates of the image, e.g.voidsetImage(BufferedImage image)Sets the image that will be shown in the map (also sets some interally used flags)voidsetImageFileName(String imageFileName)Sets the image's files name (if image is not to be kept) - this needs to be set!voidsetImageSet(boolean imageSet)voidsetMetaInformation(MetaDataMap metaInformation)voidsetNeedToKeepImage(boolean needToKeepImage)toogle, if image will be kept in RAM or if it will be reloaded from a file if neededvoidsetOrigImageHeight(int origImageHeight)for java2xmlvoidsetOrigImageWidth(int origImageWidth)for java2xmlvoidsetRasterDataChanged(boolean rasterDataChanged)voidsetSymbology(RasterSymbology symbology)voidsetTransparencyLevel(double transparencyLevel)Sets the transparency level of the image.voidsetTransparencyLevelInPercent(int transparencyInPercent)Sets the transparency level of the image.voidsetTransparentColor(Color transparentColor)Sets the color which will be drawn with a zero opacity in the Jump mapvoidsetTransparentColorAsString(String hexColorString)for java2xmlvoidsetVisible(boolean visible)shows or hides the image in the Jump mapvoidsetXmlActualImageEnvelope(String envStr)voidsetXmlEnvelope(String envStr)for java2xmlvoidsetXmlWholeImageEnvelope(String envStr)for java2xmlprotected BufferedImagestretchImageValuesForDisplay()-
Methods inherited from class com.vividsolutions.jump.workbench.model.GeoReferencedLayerable
getBlackboard, getEnvelope, getSrsInfo, setEnvelope, setSrsInfo
-
Methods inherited from class com.vividsolutions.jump.workbench.model.AbstractLayerable
fireAppearanceChanged, fireLayerChanged, getLayerManager, getMaxScale, getMinScale, getName, getTask, isEditable, isReadonly, isScaleDependentRenderingEnabled, isSelectable, isVisible, setEditable, setLayerManager, setMaxScale, setMinScale, setName, setReadonly, setScaleDependentRenderingEnabled, setSelectable, toString
-
-
-
-
Field Detail
-
lastImgProcessingMode
protected int lastImgProcessingMode
-
MODE_NONE
protected static final int MODE_NONE
- See Also:
- Constant Field Values
-
MODE_SCALINGFIRST
protected static final int MODE_SCALINGFIRST
- See Also:
- Constant Field Values
-
MODE_CLIPPINGFIRST
protected static final int MODE_CLIPPINGFIRST
- See Also:
- Constant Field Values
-
MODE_FASTDISPLAY
protected static final int MODE_FASTDISPLAY
- See Also:
- Constant Field Values
-
imagePart
protected Rectangle imagePart
-
visibleRect
protected Rectangle visibleRect
-
oldScaleXImg2Canvas
protected double oldScaleXImg2Canvas
-
xOffset
protected int xOffset
-
yOffset
protected int yOffset
-
transparencyLevel
protected double transparencyLevel
-
availRAM
protected static long availRAM
-
freeRamFactor
protected static double freeRamFactor
-
minRamToKeepFree
protected static double minRamToKeepFree
-
maxPixelsForFastDisplayMode
protected static int maxPixelsForFastDisplayMode
-
imageFileName
protected String imageFileName
-
origImageWidth
protected int origImageWidth
-
origImageHeight
protected int origImageHeight
-
imageSet
protected boolean imageSet
-
image
protected BufferedImage image
-
numBands
protected int numBands
-
rasterDataChanged
protected boolean rasterDataChanged
-
scaledBufferedImage
protected BufferedImage scaledBufferedImage
-
actualImageEnvelope
protected org.locationtech.jts.geom.Envelope actualImageEnvelope
-
visibleEnv
protected org.locationtech.jts.geom.Envelope visibleEnv
-
oldVisibleEnv
protected org.locationtech.jts.geom.Envelope oldVisibleEnv
-
firingAppearanceEvents
protected boolean firingAppearanceEvents
Flag to decide, if events are fired automatically, if the appearance (imageEnvelope, etc.) changes.
default: true
-
needToKeepImage
protected boolean needToKeepImage
Flag to control if the image should be deleted from RAM as soon as possible to save RAM or if it should be kept e.g. because it was generated dynamically and can not be loaded from a file again, once it was deleted.
-
transparentColor
protected Color transparentColor
-
transparencyColorNeedsToBeApplied
protected boolean transparencyColorNeedsToBeApplied
-
noDataValue
protected double noDataValue
-
originalCellSize
protected double originalCellSize
-
actualCellSize
protected double actualCellSize
-
metaInformation
protected MetaDataMap metaInformation
-
-
Constructor Detail
-
RasterImageLayer
public RasterImageLayer()
for java2xml
-
RasterImageLayer
public RasterImageLayer(String name, LayerManager layerManager, String imageFileName, BufferedImage imageToDisplay, org.locationtech.jts.geom.Envelope wholeImageEnvelope)
- Parameters:
name- name of the layerlayerManager- the LayerManagerimageFileName- the name of the image fileimageToDisplay- the image (if already loaded) or nullwholeImageEnvelope- the image envelope in model (real world) coordinates
-
RasterImageLayer
public RasterImageLayer(String name, LayerManager layerManager, BufferedImage imageToDisplay, Raster newRaster, org.locationtech.jts.geom.Envelope wholeImageEnvelope)
Constructor to be used in case the image was not loaded from a file, so there is no file name, but an image- Parameters:
name- name of the layerlayerManager- the LayerManagerimageToDisplay- the image (if already loaded) or nullnewRaster- the raster (if already loaded) or nullwholeImageEnvelope- the image envelope in model (real world) coordinates
-
-
Method Detail
-
getXmlEnvelope
public String getXmlEnvelope()
for java2xml- Returns:
- the Envelope as string
-
setXmlEnvelope
public void setXmlEnvelope(String envStr)
for java2xml- Parameters:
envStr- the Envelope as string
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
scaleImage
protected BufferedImage scaleImage(BufferedImage im, float xScale, float yScale)
apply a scale operation to the image and return the new image.
-
createOneColorImage
protected BufferedImage createOneColorImage(Color color)
Create a single color image in the case where a single image pixel is visible- Parameters:
color- color of the pixel- Returns:
- a single color BufferedImage
-
createImage
public BufferedImage createImage(LayerViewPanel layerViewPanel)
Creates the image to draw- Parameters:
layerViewPanel- the LayerViewPanel where the image will be drawn- Returns:
- the BufferedImage to be drawn
-
getCommittedMemory
protected long getCommittedMemory()
-
clearImageAndRaster
public boolean clearImageAndRaster(boolean garbageCollect)
Deletes image from RAM (if it is not to be kept and if the RAM consumption is high) and calls the garbage collector, ifgarbageCollectis true.- Parameters:
garbageCollect- if true the garbage collector will be called (this parameter may be overridden, if there is not enough RAM available...)
-
flushImages
public void flushImages(boolean garbageCollect)
flushes all images from the RAM.- Parameters:
garbageCollect- if true the garbage collector will be called (this parameter may be overridden, if there is not enough RAM available...)
-
reLoadImage
public void reLoadImage(LayerViewPanel layerViewPanel) throws Exception
- Throws:
Exception
-
stretchImageValuesForDisplay
protected BufferedImage stretchImageValuesForDisplay() throws NoninvertibleTransformException
- Throws:
NoninvertibleTransformException
-
getWholeImageEnvelope
public org.locationtech.jts.geom.Envelope getWholeImageEnvelope()
- Returns:
- Envelope with the real world coordinates of the image
-
getActualImageEnvelope
public org.locationtech.jts.geom.Envelope getActualImageEnvelope()
-
getXmlWholeImageEnvelope
public String getXmlWholeImageEnvelope()
for java2xml- Returns:
- the Envelope as string
-
getXmlActualImageEnvelope
public String getXmlActualImageEnvelope()
-
setXmlWholeImageEnvelope
public void setXmlWholeImageEnvelope(String envStr)
for java2xml- Parameters:
envStr- the Envelope as string
-
setXmlActualImageEnvelope
public void setXmlActualImageEnvelope(String envStr)
-
getWholeImageEnvelopeAsGeometry
public org.locationtech.jts.geom.Geometry getWholeImageEnvelopeAsGeometry()
Method to change the coordinates of the image and later apply the changes to the RasterImageLayer by usingsetGeometryAsWholeImageEnvelope(Geometry).- Returns:
- return the imageEnvelope (= bounding box) as a geometry,
-
getActualImageEnvelopeAsGeometry
public org.locationtech.jts.geom.Geometry getActualImageEnvelopeAsGeometry()
-
setGeometryAsWholeImageEnvelope
public void setGeometryAsWholeImageEnvelope(org.locationtech.jts.geom.Geometry geometry)
Method to set the coordinates of the image, e.g. after changing them after usinggetWholeImageEnvelopeAsGeometry().
-
setGeometryAsActualImageEnvelope
public void setGeometryAsActualImageEnvelope(org.locationtech.jts.geom.Geometry geometry)
-
makeBufferedImage
public static BufferedImage makeBufferedImage(Image im)
creates a BufferedImage out of an Image- Parameters:
im- the Image- Returns:
- the BufferedImage
-
getScaledImageMatchingVisible
protected BufferedImage getScaledImageMatchingVisible(BufferedImage toBeScaled, double XscaleImg2Canvas, double YscaleImg2Canvas)
-
getDrawingRectangle
public Rectangle getDrawingRectangle(double imgWidth, double imgHeight, org.locationtech.jts.geom.Envelope imageEnv, Viewport viewport) throws NoninvertibleTransformException
- Throws:
NoninvertibleTransformException
-
getVisibleImageCoordinatesOfImage
protected Rectangle getVisibleImageCoordinatesOfImage(double imgWidth, double imgHeight, org.locationtech.jts.geom.Envelope viewportEnv, org.locationtech.jts.geom.Envelope imageEnv)
Returns the visible part of the image in image coordinate- Parameters:
imgWidth- original image widthimgHeight- original image heightviewportEnv- viewport in model coordinatesimageEnv- image envelope in model coordinates- Returns:
- visible part of the image in image coordinates
-
getVisibleImageCoordinatesOfImage
protected Rectangle getVisibleImageCoordinatesOfImage(BufferedImage img, org.locationtech.jts.geom.Envelope visible, org.locationtech.jts.geom.Envelope imageEnv)
-
getVisiblePartOfTheImage
protected BufferedImage getVisiblePartOfTheImage(BufferedImage img, Rectangle desiredImageArea)
-
getImage
public BufferedImage getImage()
-
setImage
public void setImage(BufferedImage image)
Sets the image that will be shown in the map (also sets some interally used flags)- Parameters:
image- image that will be shown in the map
-
setImageSet
public void setImageSet(boolean imageSet)
-
isImageNull
public boolean isImageNull()
-
getImageForDisplay
public BufferedImage getImageForDisplay(LayerViewPanel layerViewPanel) throws Exception
returns the image, this can be modified - i.e. is just a representation.- Returns:
- the image
- Throws:
Exception
-
isImageSet
public boolean isImageSet()
- Returns:
- true, if the image object was set at least once, else false
-
getTransparencyLevel
public double getTransparencyLevel()
Returns the transparency level of the image. The transparencyLevel controlls the transparency level of the whole image (all pixels). It is independent of the transparency color, that replaces a certain color in the image. The transparencyLevel is expressed as a float within a range from 0.0 (no transparency) to 1.0 (full transparency).- Returns:
- the transparency level of the image
-
setTransparencyLevel
public void setTransparencyLevel(double transparencyLevel)
Sets the transparency level of the image. This controlls the transparency level of the whole image (all pixels). It is independent of the transparency color, that replaces a certain color in the image. The transparencyLevel is expressed as a float within a range from 0.0 (no transparency) to 1.0 (full transparency).- Parameters:
transparencyLevel- the transparency level of the image
-
setTransparencyLevelInPercent
public void setTransparencyLevelInPercent(int transparencyInPercent)
Sets the transparency level of the image. This controlls the transparency level of the whole image (all pixels). It is independent of the transparency color, that replaces a certain color in the image. The transparencyLevel is expressed as a percentage within a range from 0 (no transparency) to 100 (full transparency).- Parameters:
transparencyInPercent- the transparency level of the image
-
getTransparentColor
public Color getTransparentColor()
Gets the color which will be drawn with a zero opacity in the Jump map- Returns:
- color that will be replaced with transparent pixels
-
getTransparentColorAsString
public String getTransparentColorAsString()
for java2xml
-
setTransparentColorAsString
public void setTransparentColorAsString(String hexColorString)
for java2xml
-
setTransparentColor
public void setTransparentColor(Color transparentColor)
Sets the color which will be drawn with a zero opacity in the Jump map- Parameters:
transparentColor- the color for transparency
-
forceTotalRepaint
protected void forceTotalRepaint()
After this method was invoked, the image will be completely re-rendered (not using caches) the next time.
-
getXOffset
public int getXOffset()
- Returns:
- the current offset (to the viewport's
(0,0)) in x direction
-
getYOffset
public int getYOffset()
- Returns:
- the current offset (to the viewport's
(0,0)) in y direction
-
getFreeRamFactor
public static double getFreeRamFactor()
-
setFreeRamFactor
public static void setFreeRamFactor(double freeRamFactor)
-
getAvailRAM
public static long getAvailRAM()
-
getMaxPixelsForFastDisplayMode
public static int getMaxPixelsForFastDisplayMode()
-
getMinRamToKeepFree
public static double getMinRamToKeepFree()
-
setImageFileName
public void setImageFileName(String imageFileName)
Sets the image's files name (if image is not to be kept) - this needs to be set!- Parameters:
imageFileName- the file name of the image
-
getImageFileName
public String getImageFileName()
- Returns:
- the file name of the image represented by this instance of the
RasterImageLayer
-
isNeedToKeepImage
public boolean isNeedToKeepImage()
check, if image will be kept in RAM or if it will be reloaded from a file if needed- Returns:
- true if image will be kept in RAM, else false
-
setNeedToKeepImage
public void setNeedToKeepImage(boolean needToKeepImage)
toogle, if image will be kept in RAM or if it will be reloaded from a file if needed- Parameters:
needToKeepImage- true if image is supposed be kept in RAM, else false
-
finalize
protected void finalize() throws Throwable
-
getOrigImageHeight
public int getOrigImageHeight()
- Returns:
- the height of the source image
-
getOrigImageWidth
public int getOrigImageWidth()
- Returns:
- the width of the source image
-
setOrigImageHeight
public void setOrigImageHeight(int origImageHeight)
for java2xml- Parameters:
origImageHeight- height of original image
-
setOrigImageWidth
public void setOrigImageWidth(int origImageWidth)
for java2xml- Parameters:
origImageWidth- width of original image
-
setVisible
public void setVisible(boolean visible)
shows or hides the image in the Jump map- Specified by:
setVisiblein interfaceLayerable- Overrides:
setVisiblein classAbstractLayerable- Parameters:
visible- set true if image must be visible
-
isFiringAppearanceEvents
public boolean isFiringAppearanceEvents()
- Returns:
- true if appearance events are fired automatically, false if not
- See Also:
firingAppearanceEvents
-
setFiringAppearanceEvents
public void setFiringAppearanceEvents(boolean firingAppearanceEvents)
- Parameters:
firingAppearanceEvents- true if appearance events are to be fired automatically, false if not- See Also:
firingAppearanceEvents
-
getMetaInformation
public MetaDataMap getMetaInformation()
- Specified by:
getMetaInformationin interfaceObjectContainingMetaInformation
-
setMetaInformation
public void setMetaInformation(MetaDataMap metaInformation)
- Specified by:
setMetaInformationin interfaceObjectContainingMetaInformation
-
getRasterData
public Raster getRasterData(Rectangle subset) throws IOException
- Throws:
IOException
-
getRectangleFromEnvelope
public Rectangle getRectangleFromEnvelope(org.locationtech.jts.geom.Envelope envelope)
-
isRasterDataChanged
public boolean isRasterDataChanged()
- Returns:
- the rasterDataChanged
-
setRasterDataChanged
public void setRasterDataChanged(boolean rasterDataChanged)
- Parameters:
rasterDataChanged- the rasterDataChanged to set
-
getNoDataValue
public double getNoDataValue()
Default value is NaN. The value can be different when data have been read, for example, from (ESRI) ASCII grid images- Returns:
- value that is written when a cell does not contain data
-
getNumBands
public int getNumBands()
TODO: sstein test - 25.Sept.2013- Returns:
- number of bands
-
dispose
public void dispose()
- Specified by:
disposein interfaceDisposable
-
getCellValue
public Double getCellValue(org.locationtech.jts.geom.Coordinate coordinate, int band) throws IOException
- Throws:
IOException
-
getCellValue
public Double getCellValue(int col, int row, int band) throws IOException
- Throws:
IOException
-
getCellValue
public Double getCellValue(double coordX, double coordY, int band) throws IOException
- Throws:
IOException
-
isNoData
public boolean isNoData(double value)
-
getMetadata
public Metadata getMetadata()
-
getViewportRectangle
public static Rectangle getViewportRectangle(WorkbenchContext workbenchContext)
-
getSymbology
public RasterSymbology getSymbology()
-
setSymbology
public void setSymbology(RasterSymbology symbology) throws NoninvertibleTransformException
- Throws:
NoninvertibleTransformException
-
getActualRasterData
public Raster getActualRasterData()
-
getUUID
public UUID getUUID()
-
isTemporaryLayer
public boolean isTemporaryLayer()
Check if selected sextante raster layer is Temporary layer Both layers in memory and layes stored into TEMP folder are considered as "Temporary layers"
-
getFilePath
public String getFilePath()
- Returns:
- the file path of a RasterImageLayer.class eg. C/File/imagename.tif. If the file path is a TEMP folder it returns that the layer has no datasource
-
isSpatiallyConsistentWith
public boolean isSpatiallyConsistentWith(RasterImageLayer rasterImageLayer)
Check if the RasteImageLayer is spatially consistent with another:- both have the same cell size
- both have the same dimension (same width and height)
- both overlap to each other into the geographic space
- Parameters:
rasterImageLayer- another RasterImageLayer- Returns:
- true if they are spatially consistent, false if they are not
-
-