Class TiePointGrid
- java.lang.Object
- 
- com.bc.ceres.core.ExtensibleObject
- 
- org.esa.snap.core.datamodel.ProductNode
- 
- org.esa.snap.core.datamodel.DataNode
- 
- org.esa.snap.core.datamodel.RasterDataNode
- 
- org.esa.snap.core.datamodel.TiePointGrid
 
 
 
 
 
- 
- All Implemented Interfaces:
- Extensible,- Scaling,- SceneTransformProvider
 
 public class TiePointGrid extends RasterDataNode A tie-point grid contains the data for geophysical parameter in remote sensing data products. Tie-point grid are two-dimensional images which hold their pixel values (samples) in afloatarray.Usually, tie-point grids are a sub-sampling of a data product's scene resolution. 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.esa.snap.core.datamodel.RasterDataNodeRasterDataNode.RasterDataProcessor
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static intDISCONT_AT_180Tie point values have angles in the range -180...+180 degrees and may comprise a discontinuity at 180 (resp.static intDISCONT_AT_360Tie point values have are angles in the range 0...+360 degrees and may comprise a discontinuity at 360 (resp.static intDISCONT_AUTOThe discontinuity of the tie point values shall be detected automatically.static intDISCONT_NONETie point values are assumed to have none discontinuities.- 
Fields inherited from class org.esa.snap.core.datamodel.RasterDataNodeINVALID_POS_TEXT, IO_ERROR_TEXT, NO_DATA_TEXT, PROPERTY_NAME_ANCILLARY_RELATIONS, PROPERTY_NAME_ANCILLARY_VARIABLES, PROPERTY_NAME_GEO_CODING, PROPERTY_NAME_IMAGE_INFO, PROPERTY_NAME_IMAGE_TO_MODEL_TRANSFORM, PROPERTY_NAME_LOG_10_SCALED, PROPERTY_NAME_MODEL_TO_SCENE_TRANSFORM, PROPERTY_NAME_NO_DATA_VALUE, PROPERTY_NAME_NO_DATA_VALUE_USED, PROPERTY_NAME_SCALING_FACTOR, PROPERTY_NAME_SCALING_OFFSET, PROPERTY_NAME_SCENE_TO_MODEL_TRANSFORM, PROPERTY_NAME_STX, PROPERTY_NAME_TIME_CODING, PROPERTY_NAME_VALID_PIXEL_EXPRESSION
 - 
Fields inherited from class org.esa.snap.core.datamodel.DataNodePROPERTY_NAME_DATA, PROPERTY_NAME_READ_ONLY, PROPERTY_NAME_SYNTHETIC, PROPERTY_NAME_UNIT
 - 
Fields inherited from class org.esa.snap.core.datamodel.ProductNodePROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description TiePointGrid(String name, int gridWidth, int gridHeight, double offsetX, double offsetY, double subSamplingX, double subSamplingY)Constructs a newTiePointGridwith the given tie point grid properties.TiePointGrid(String name, int gridWidth, int gridHeight, double offsetX, double offsetY, double subSamplingX, double subSamplingY, float[] tiePoints)Constructs a newTiePointGridwith the given tie point grid properties.TiePointGrid(String name, int gridWidth, int gridHeight, double offsetX, double offsetY, double subSamplingX, double subSamplingY, float[] tiePoints, boolean containsAngles)Constructs a newTiePointGridwith the given tie point grid properties.TiePointGrid(String name, int gridWidth, int gridHeight, double offsetX, double offsetY, double subSamplingX, double subSamplingY, float[] tiePoints, int discontinuity)Constructs a newTiePointGridwith the given tie point grid properties.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptVisitor(ProductVisitor visitor)Accepts the given visitor.TiePointGridcloneTiePointGrid()protected RenderedImagecreateSourceImage()Creates the source image associated with thisRasterDataNode.static TiePointGridcreateSubset(TiePointGrid sourceTiePointGrid, ProductSubsetDef subsetDef)static TiePointGridcreateZenithFromElevationAngleTiePointGrid(TiePointGrid elevationAngleGrid)voiddispose()Releases all of the resources used by this object instance and all of its owned children.protected static double[]ensureMinLengthArray(double[] array, int length)protected static float[]ensureMinLengthArray(float[] array, int length)protected static int[]ensureMinLengthArray(int[] array, int length)intgetDiscontinuity()Gets the angular discontinuity.static intgetDiscontinuity(float[] tiePoints)Determines the angular discontinuity of the given tie point values.intgetGeophysicalDataType()Returns the geophysical data type of thisRasterDataNode.ProductDatagetGridData()intgetGridHeight()intgetGridWidth()doublegetOffsetX()Retrieves the x co-ordinate of the first (upper-left) tie-point in pixels.doublegetOffsetY()Retrieves the y co-ordinate of the first (upper-left) tie-point in pixels.doublegetPixelDouble(double x, double y)Gets the interpolated sample for the pixel located at (x,y) as a double value.doublegetPixelDouble(int x, int y)Gets the interpolated sample for the pixel located at (x,y) as a double value.floatgetPixelFloat(float x, float y)Computes the interpolated sample for the pixel located at (x,y) given as floating point co-ordinates.floatgetPixelFloat(int x, int y)Computes the interpolated sample for the pixel located at (x,y).intgetPixelInt(int x, int y)Gets the interpolated sample for the pixel located at (x,y) as an integer value.double[]getPixels(int x, int y, int w, int h, double[] pixels, ProgressMonitor pm)Retrieves an array of tie point data interpolated to the product width and height as float array.float[]getPixels(int x, int y, int w, int h, float[] pixels, ProgressMonitor pm)Retrieves an array of tie point data interpolated to the product with and height as double array.int[]getPixels(int x, int y, int w, int h, int[] pixels, ProgressMonitor pm)Retrieves an array of tie point data interpolated to the product with and height as integer array.ProductDatagetRasterData()Gets the linear interpolated raster data containingrasterWidthxrasterHeightsamples.intgetRasterHeight()intgetRasterWidth()doublegetSubSamplingX()Returns the sub-sampling in X-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.doublegetSubSamplingY()Returns the sub-sampling in Y-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.float[]getTiePoints()booleanisFloatingPointType()Returnstruedouble[]readPixels(int x, int y, int w, int h, double[] pixels, ProgressMonitor pm)Retrieves an array of tie point data interpolated to the product with and height as double array.float[]readPixels(int x, int y, int w, int h, float[] pixels, ProgressMonitor pm)Retrieves an array of tie point data interpolated to the product with and height as float array.int[]readPixels(int x, int y, int w, int h, int[] pixels, ProgressMonitor pm)Retrieves an array of tie point data interpolated to the product with and height as float array.voidreadRasterData(int offsetX, int offsetY, int width, int height, ProductData rasterData, ProgressMonitor pm)Reads raster data from this dataset into the user-supplied raster data buffer.voidreadRasterDataFully(ProgressMonitor pm)Reads the complete underlying raster data.voidsetData(ProductData data)Sets the data of this data node.voidsetDiscontinuity(int discontinuity)Sets the angular discontinuity.voidsetPixelDouble(int x, int y, double pixelValue)This method is not implemented because pixels are read-only in tie-point grids.voidsetPixelFloat(int x, int y, float pixelValue)This method is not implemented because pixels are read-only in tie-point grids.voidsetPixelInt(int x, int y, int pixelValue)This method is not implemented because pixels are read-only in tie-point grids.voidsetPixels(int x, int y, int w, int h, double[] pixels)This method is not implemented because pixels are read-only in tie-point grids.voidsetPixels(int x, int y, int w, int h, float[] pixels)This method is not implemented because pixels are read-only in tie-point grids.voidsetPixels(int x, int y, int w, int h, int[] pixels)This method is not implemented because pixels are read-only in tie-point grids.voidsetRasterData(ProductData rasterData)The method will always fail on tie-point grids as they are read-only.voidwritePixels(int x, int y, int w, int h, double[] pixels, ProgressMonitor pm)This method is not implemented because pixels are read-only in tie-point grids.voidwritePixels(int x, int y, int w, int h, float[] pixels, ProgressMonitor pm)This method is not implemented because pixels are read-only in tie-point grids.voidwritePixels(int x, int y, int w, int h, int[] pixels, ProgressMonitor pm)This method is not implemented because pixels are read-only in tie-point grids.voidwriteRasterData(int offsetX, int offsetY, int width, int height, ProductData rasterData, ProgressMonitor pm)Writes data from this product raster into the specified region of the user-supplied raster.voidwriteRasterDataFully(ProgressMonitor pm)Writes the complete underlying raster data.- 
Methods inherited from class org.esa.snap.core.datamodel.RasterDataNodeaddAncillaryVariable, canBeOrthorectified, checkCompatibleRasterData, clearNoDataValue, computeStxImpl, createColorIndexedImage, createCompatibleRasterData, createCompatibleRasterData, createCompatibleSceneRasterData, createDefaultImageInfo, createDefaultImageInfo, createMultiLevelModel, createPointing, createRgbImage, createTransectProfileData, fireImageInfoChanged, getAncillaryRelations, getAncillaryVariable, getAncillaryVariables, getGeoCoding, getGeophysicalImage, getGeophysicalNoDataValue, getImageInfo, getImageInfo, getImageInfo, getImageToModelTransform, getModelToSceneTransform, getMultiLevelModel, getNoDataValue, getOverlayMaskGroup, getPixels, getPixels, getPixelString, getPointing, getRasterSize, getSampleFloat, getSampleInt, getScalingFactor, getScalingOffset, getSceneToModelTransform, getSourceImage, getStx, getStx, getTimeCoding, getValidMaskExpression, getValidMaskImage, getValidPixelExpression, getValidShape, hasIntPixels, hasRasterData, isCompatibleRasterData, isGeophysicalImageSet, isLog10Scaled, isNoDataValueSet, isNoDataValueUsed, isPixelValid, isPixelValid, isPixelValid, isPixelWithinImageBounds, isScalingApplied, isSourceImageSet, isStxSet, isValidMaskImageSet, isValidMaskProperty, isValidMaskUsed, loadRasterData, loadRasterData, processRasterData, quantizeRasterData, quantizeRasterData, readPixels, readPixels, readPixels, readRasterData, readRasterDataFully, readValidMask, removeAncillaryVariable, removeCachedImageData, resetValidMask, scale, scaleInverse, setAncillaryRelations, setGeoCoding, setGeophysicalNoDataValue, setImageInfo, setImageInfo, setImageToModelTransform, setLog10Scaled, setModelToSceneTransform, setModified, setNoDataValue, setNoDataValueUsed, setScalingFactor, setScalingOffset, setSceneToModelTransform, setSourceImage, setSourceImage, setStx, setTimeCoding, setValidPixelExpression, unloadRasterData, updateExpression, writePixels, writePixels, writePixels, writeRasterData, writeRasterDataFully
 - 
Methods inherited from class org.esa.snap.core.datamodel.DataNodecheckDataCompatibility, createCompatibleProductData, fireProductNodeDataChanged, getData, getDataElems, getDataElemSize, getDataType, getNumDataElems, getRawStorageSize, getUnit, isReadOnly, isSynthetic, setDataElems, setReadOnly, setSynthetic, setUnit
 - 
Methods inherited from class org.esa.snap.core.datamodel.ProductNodefireProductNodeChanged, fireProductNodeChanged, getDescription, getDisplayName, getName, getOwner, getProduct, getProductReader, getProductReaderSafe, getProductRefString, getProductSafe, getProductWriter, getProductWriterSafe, getRawStorageSize, isModified, isPartOfSubset, isValidNodeName, removeFromFile, setDescription, setName, setNodeName, setOwner, toString
 - 
Methods inherited from class com.bc.ceres.core.ExtensibleObjectgetExtension
 
- 
 
- 
- 
- 
Field Detail- 
DISCONT_AUTOpublic static final int DISCONT_AUTO The discontinuity of the tie point values shall be detected automatically.- See Also:
- Constant Field Values
 
 - 
DISCONT_NONEpublic static final int DISCONT_NONE Tie point values are assumed to have none discontinuities.- See Also:
- Constant Field Values
 
 - 
DISCONT_AT_180public static final int DISCONT_AT_180 Tie point values have angles in the range -180...+180 degrees and may comprise a discontinuity at 180 (resp. -180) degrees.- See Also:
- Constant Field Values
 
 - 
DISCONT_AT_360public static final int DISCONT_AT_360 Tie point values have are angles in the range 0...+360 degrees and may comprise a discontinuity at 360 (resp. 0) degrees.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
TiePointGridpublic TiePointGrid(String name, int gridWidth, int gridHeight, double offsetX, double offsetY, double subSamplingX, double subSamplingY) Constructs a newTiePointGridwith the given tie point grid properties.- Parameters:
- name- the name of the new object
- gridWidth- the width of the tie-point grid in pixels
- gridHeight- the height of the tie-point grid in pixels
- offsetX- the X co-ordinate of the first (upper-left) tie-point in pixels
- offsetY- the Y co-ordinate of the first (upper-left) tie-point in pixels
- subSamplingX- the sub-sampling in X-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to. Must not be less than one.
- subSamplingY- the sub-sampling in X-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to. Must not be less than one.
 
 - 
TiePointGridpublic TiePointGrid(String name, int gridWidth, int gridHeight, double offsetX, double offsetY, double subSamplingX, double subSamplingY, float[] tiePoints) Constructs a newTiePointGridwith the given tie point grid properties.- Parameters:
- name- the name of the new object
- gridWidth- the width of the tie-point grid in pixels
- gridHeight- the height of the tie-point grid in pixels
- offsetX- the X co-ordinate of the first (upper-left) tie-point in pixels
- offsetY- the Y co-ordinate of the first (upper-left) tie-point in pixels
- subSamplingX- the sub-sampling in X-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to. Must not be less than one.
- subSamplingY- the sub-sampling in X-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to. Must not be less than one.
- tiePoints- the tie-point data values, must be an array of the size- gridWidth * gridHeight
 
 - 
TiePointGridpublic TiePointGrid(String name, int gridWidth, int gridHeight, double offsetX, double offsetY, double subSamplingX, double subSamplingY, float[] tiePoints, boolean containsAngles) Constructs a newTiePointGridwith the given tie point grid properties.- Parameters:
- name- the name of the new object
- gridWidth- the width of the tie-point grid in pixels
- gridHeight- the height of the tie-point grid in pixels
- offsetX- the X co-ordinate of the first (upper-left) tie-point in pixels
- offsetY- the Y co-ordinate of the first (upper-left) tie-point in pixels
- subSamplingX- the sub-sampling in X-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to. Must not be less than one.
- subSamplingY- the sub-sampling in X-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to. Must not be less than one.
- tiePoints- the tie-point data values, must be an array of the size- gridWidth * gridHeight
- containsAngles- if true, the- angular discontinuityis derived from the provided tie-point data values
 
 - 
TiePointGridpublic TiePointGrid(String name, int gridWidth, int gridHeight, double offsetX, double offsetY, double subSamplingX, double subSamplingY, float[] tiePoints, int discontinuity) Constructs a newTiePointGridwith the given tie point grid properties.- Parameters:
- name- the name of the new object
- gridWidth- the width of the tie-point grid in pixels
- gridHeight- the height of the tie-point grid in pixels
- offsetX- the X co-ordinate of the first (upper-left) tie-point in pixels
- offsetY- the Y co-ordinate of the first (upper-left) tie-point in pixels
- subSamplingX- the sub-sampling in X-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to. Must not be less than one.
- subSamplingY- the sub-sampling in X-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to. Must not be less than one.
- tiePoints- the tie-point data values, must be an array of the size- gridWidth * gridHeight
- discontinuity- the discontinuity mode, can be either- DISCONT_NONE,- DISCONT_AUTO,- DISCONT_AT_180or- DISCONT_AT_360
 
 
- 
 - 
Method Detail- 
getGridWidthpublic int getGridWidth() - Returns:
- The grid's width (= number of columns).
 
 - 
getGridHeightpublic int getGridHeight() - Returns:
- The grid's height (= number of rows).
 
 - 
getOffsetXpublic double getOffsetX() Retrieves the x co-ordinate of the first (upper-left) tie-point in pixels.
 - 
getOffsetYpublic double getOffsetY() Retrieves the y co-ordinate of the first (upper-left) tie-point in pixels.
 - 
getSubSamplingXpublic double getSubSamplingX() Returns the sub-sampling in X-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.- Returns:
- the sub-sampling in X-direction, never less than one.
 
 - 
getSubSamplingYpublic double getSubSamplingY() Returns the sub-sampling in Y-direction given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.- Returns:
- the sub-sampling in Y-direction, never less than one.
 
 - 
getTiePointspublic float[] getTiePoints() - Returns:
- The data array representing the single tie-points.
 
 - 
getGridDatapublic ProductData getGridData() - Returns:
- The data buffer representing the single tie-points.
 
 - 
getRasterWidthpublic int getRasterWidth() - Specified by:
- getRasterWidthin class- RasterDataNode
- Returns:
- The native width of the raster in pixels.
 
 - 
getRasterHeightpublic int getRasterHeight() - Specified by:
- getRasterHeightin class- RasterDataNode
- Returns:
- The native height of the raster in pixels.
 
 - 
getDiscontinuitypublic static int getDiscontinuity(float[] tiePoints) Determines the angular discontinuity of the given tie point values.- Returns:
- the angular discontinuity, will always be either DISCONT_AT_180orDISCONT_AT_360
 
 - 
getDiscontinuitypublic int getDiscontinuity() Gets the angular discontinuity.- Returns:
- the angular discontinuity, will always be either DISCONT_NONE,DISCONT_AUTO,DISCONT_AT_180orDISCONT_AT_360
 
 - 
setDiscontinuitypublic void setDiscontinuity(int discontinuity) Sets the angular discontinuity.- Parameters:
- discontinuity- angular discontinuity, can be either- DISCONT_NONE,- DISCONT_AUTO,- DISCONT_AT_180or- DISCONT_AT_360
 
 - 
isFloatingPointTypepublic boolean isFloatingPointType() Returnstrue- Overrides:
- isFloatingPointTypein class- RasterDataNode
- Returns:
- true
 
 - 
getGeophysicalDataTypepublic int getGeophysicalDataType() Returns the geophysical data type of thisRasterDataNode. The value returned is always one of theProductData.TYPE_XXXconstants.- Overrides:
- getGeophysicalDataTypein class- RasterDataNode
- Returns:
- the geophysical data type
- See Also:
- ProductData
 
 - 
setDatapublic void setData(ProductData data) Description copied from class:DataNodeSets the data of this data node.
 - 
getRasterDatapublic ProductData getRasterData() Gets the linear interpolated raster data containingrasterWidthxrasterHeightsamples.- Overrides:
- getRasterDatain class- RasterDataNode
- Returns:
- The raster data for this tie-point grid.
 
 - 
setRasterDatapublic void setRasterData(ProductData rasterData) throws UnsupportedOperationException The method will always fail on tie-point grids as they are read-only.- Overrides:
- setRasterDatain class- RasterDataNode
- Parameters:
- rasterData- The raster data whose reference will be stored.
- Throws:
- UnsupportedOperationException
- See Also:
- RasterDataNode.getRasterData()
 
 - 
getPixelIntpublic int getPixelInt(int x, int y)Gets the interpolated sample for the pixel located at (x,y) as an integer value.If the pixel co-ordinates given by (x,y) are not covered by this tie-point grid, the method extrapolates. - Specified by:
- getPixelIntin class- RasterDataNode
- Parameters:
- x- The X co-ordinate of the pixel location
- y- The Y co-ordinate of the pixel location
- Returns:
- the pixel value at (x,y)
- Throws:
- ArrayIndexOutOfBoundsException- if the co-ordinates are not in bounds
 
 - 
disposepublic void dispose() Description copied from class:RasterDataNodeReleases all of the resources used by this object instance and all of its owned children. Its primary use is to allow the garbage collector to perform a vanilla job.This method should be called only if it is for sure that this object instance will never be used again. The results of referencing an instance of this class after a call to dispose()are undefined.Overrides of this method should always call super.dispose();after disposing this instance.- Overrides:
- disposein class- RasterDataNode
 
 - 
getPixelFloatpublic float getPixelFloat(int x, int y)Computes the interpolated sample for the pixel located at (x,y).If the pixel co-ordinates given by (x,y) are not covered by this tie-point grid, the method extrapolates. - Specified by:
- getPixelFloatin class- RasterDataNode
- Parameters:
- x- The X co-ordinate of the pixel location, given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.
- y- The Y co-ordinate of the pixel location, given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.
- Returns:
- the pixel value at (x,y)
- Throws:
- ArrayIndexOutOfBoundsException- if the co-ordinates are not in bounds
 
 - 
getPixelFloatpublic final float getPixelFloat(float x, float y)Computes the interpolated sample for the pixel located at (x,y) given as floating point co-ordinates.If the pixel co-ordinates given by (x,y) are not covered by this tie-point grid, the method extrapolates. - Parameters:
- x- The X co-ordinate of the pixel location, given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.
- y- The Y co-ordinate of the pixel location, given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.
- Throws:
- ArrayIndexOutOfBoundsException- if the co-ordinates are not in bounds
 
 - 
getPixelDoublepublic double getPixelDouble(int x, int y)Gets the interpolated sample for the pixel located at (x,y) as a double value.If the pixel co-ordinates given by (x,y) are not covered by this tie-point grid, the method extrapolates. - Specified by:
- getPixelDoublein class- RasterDataNode
- Parameters:
- x- The X co-ordinate of the pixel location, given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.
- y- The Y co-ordinate of the pixel location, given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.
- Returns:
- the pixel value at (x,y)
- Throws:
- ArrayIndexOutOfBoundsException- if the co-ordinates are not in bounds
 
 - 
getPixelDoublepublic double getPixelDouble(double x, double y)Gets the interpolated sample for the pixel located at (x,y) as a double value.If the pixel co-ordinates given by (x,y) are not covered by this tie-point grid, the method extrapolates. - Parameters:
- x- The X co-ordinate of the pixel location, given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.
- y- The Y co-ordinate of the pixel location, given in the pixel co-ordinates of the data product to which this tie-point grid belongs to.
- Throws:
- ArrayIndexOutOfBoundsException- if the co-ordinates are not in bounds
 
 - 
setPixelIntpublic void setPixelInt(int x, int y, int pixelValue)This method is not implemented because pixels are read-only in tie-point grids.- Specified by:
- setPixelIntin class- RasterDataNode
- Parameters:
- x- the X co-ordinate of the pixel location
- y- the Y co-ordinate of the pixel location
- pixelValue- the new pixel value at (x,y)
 
 - 
setPixelFloatpublic void setPixelFloat(int x, int y, float pixelValue)This method is not implemented because pixels are read-only in tie-point grids.- Specified by:
- setPixelFloatin class- RasterDataNode
- Parameters:
- x- the X co-ordinate of the pixel location
- y- the Y co-ordinate of the pixel location
- pixelValue- the new pixel value at (x,y)
 
 - 
setPixelDoublepublic void setPixelDouble(int x, int y, double pixelValue)This method is not implemented because pixels are read-only in tie-point grids.- Specified by:
- setPixelDoublein class- RasterDataNode
- Parameters:
- x- the X co-ordinate of the pixel location
- y- the Y co-ordinate of the pixel location
- pixelValue- the new pixel value at (x,y)
 
 - 
getPixelspublic int[] getPixels(int x, int y, int w, int h, int[] pixels, ProgressMonitor pm)Retrieves an array of tie point data interpolated to the product with and height as integer array. If the given array isnulla new one was created and returned.- Specified by:
- getPixelsin class- RasterDataNode
- Parameters:
- x- the x coordinate of the array to be read
- y- the y coordinate of the array to be read
- w- the width of the array to be read
- h- the height of the array to be read
- pixels- the integer array to be filled with data
- pm- a monitor to inform the user about progress
- Throws:
- IllegalArgumentException- if the length of the given array is less than- w*h.
 
 - 
getPixelspublic double[] getPixels(int x, int y, int w, int h, double[] pixels, ProgressMonitor pm)Retrieves an array of tie point data interpolated to the product width and height as float array. If the given array isnulla new one is created and returned.- Specified by:
- getPixelsin class- RasterDataNode
- Parameters:
- x- the x coordinate of the array to be read
- y- the y coordinate of the array to be read
- w- the width of the array to be read
- h- the height of the array to be read
- pixels- the float array to be filled with data
- pm- a monitor to inform the user about progress
- Throws:
- IllegalArgumentException- if the length of the given array is less than- w*h.
 
 - 
getPixelspublic float[] getPixels(int x, int y, int w, int h, float[] pixels, ProgressMonitor pm)Retrieves an array of tie point data interpolated to the product with and height as double array. If the given array isnulla new one was created and returned.- Specified by:
- getPixelsin class- RasterDataNode
- Parameters:
- x- the x coordinate of the array to be read
- y- the y coordinate of the array to be read
- w- the width of the array to be read
- h- the height of the array to be read
- pixels- the double array to be filled with data
- pm- a progress monitor
- Throws:
- IllegalArgumentException- if the length of the given array is less than- w*h.
 
 - 
setPixelspublic void setPixels(int x, int y, int w, int h, int[] pixels)This method is not implemented because pixels are read-only in tie-point grids.- Specified by:
- setPixelsin class- RasterDataNode
- Parameters:
- x- x offset into the band
- y- y offset into the band
- w- width of the pixel array to be written
- h- height of the pixel array to be written.
- pixels- integer array to be written
 
 - 
setPixelspublic void setPixels(int x, int y, int w, int h, float[] pixels)This method is not implemented because pixels are read-only in tie-point grids.- Specified by:
- setPixelsin class- RasterDataNode
- Parameters:
- x- x offset into the band
- y- y offset into the band
- w- width of the pixel array to be written
- h- height of the pixel array to be written.
- pixels- float array to be written
 
 - 
setPixelspublic void setPixels(int x, int y, int w, int h, double[] pixels)This method is not implemented because pixels are read-only in tie-point grids.- Specified by:
- setPixelsin class- RasterDataNode
- Parameters:
- x- x offset into the band
- y- y offset into the band
- w- width of the pixel array to be written
- h- height of the pixel array to be written.
- pixels- double array to be written
 
 - 
readPixelspublic int[] readPixels(int x, int y, int w, int h, int[] pixels, ProgressMonitor pm) throws IOExceptionRetrieves an array of tie point data interpolated to the product with and height as float array. If the given array isnulla new one was created and returned.- Specified by:
- readPixelsin class- RasterDataNode
- Parameters:
- x- the x coordinate of the array to be read
- y- the y coordinate of the array to be read
- w- the width of the array to be read
- h- the height of the array to be read
- pixels- the integer array to be filled with data
- pm- a progress monitor
- Returns:
- the pixels read
- Throws:
- IllegalArgumentException- if the length of the given array is less than- w*h.
- IOException- if an /IO error occurs
 
 - 
readPixelspublic float[] readPixels(int x, int y, int w, int h, float[] pixels, ProgressMonitor pm) throws IOExceptionRetrieves an array of tie point data interpolated to the product with and height as float array. If the given array isnulla new one was created and returned. *- Specified by:
- readPixelsin class- RasterDataNode
- Parameters:
- x- the x coordinate of the array to be read
- y- the y coordinate of the array to be read
- w- the width of the array to be read
- h- the height of the array to be read
- pixels- the float array to be filled with data
- pm- a monitor to inform the user about progress
- Returns:
- the pixels read
- Throws:
- IllegalArgumentException- if the length of the given array is less than- w*h.
- IOException
 
 - 
readPixelspublic double[] readPixels(int x, int y, int w, int h, double[] pixels, ProgressMonitor pm) throws IOExceptionRetrieves an array of tie point data interpolated to the product with and height as double array. If the given array isnulla new one was created and returned.- Specified by:
- readPixelsin class- RasterDataNode
- Parameters:
- x- the x coordinate of the array to be read
- y- the y coordinate of the array to be read
- w- the width of the array to be read
- h- the height of the array to be read
- pixels- the double array to be filled with data
- pm- a monitor to inform the user about progress
- Returns:
- the pixels read
- Throws:
- IllegalArgumentException- if the length of the given array is less than- w*h.
- IOException
 
 - 
writePixelspublic void writePixels(int x, int y, int w, int h, int[] pixels, ProgressMonitor pm) throws IOExceptionThis method is not implemented because pixels are read-only in tie-point grids.- Specified by:
- writePixelsin class- RasterDataNode
- Parameters:
- x- x offset into the band
- y- y offset into the band
- w- width of the pixel array to be written
- h- height of the pixel array to be written
- pixels- array of pixels to write
- pm- a progress monitor
- Throws:
- IOException- if an I/O error occurs
 
 - 
writePixelspublic void writePixels(int x, int y, int w, int h, float[] pixels, ProgressMonitor pm) throws IOExceptionThis method is not implemented because pixels are read-only in tie-point grids.- Specified by:
- writePixelsin class- RasterDataNode
- Parameters:
- x- x offset into the band
- y- y offset into the band
- w- width of the pixel array to be written
- h- height of the pixel array to be written
- pixels- array of pixels to write
- pm- a progress monitor
- Throws:
- IOException- if an I/O error occurs
 
 - 
writePixelspublic void writePixels(int x, int y, int w, int h, double[] pixels, ProgressMonitor pm) throws IOExceptionThis method is not implemented because pixels are read-only in tie-point grids.- Specified by:
- writePixelsin class- RasterDataNode
- Parameters:
- x- x offset into the band
- y- y offset into the band
- w- width of the pixel array to be written
- h- height of the pixel array to be written
- pixels- array of pixels to write
- pm- a progress monitor
- Throws:
- IOException- if an I/O error occurs
 
 - 
readRasterDatapublic void readRasterData(int offsetX, int offsetY, int width, int height, ProductData rasterData, ProgressMonitor pm) throws IOExceptionReads raster data from this dataset into the user-supplied raster data buffer.This method always directly (re-)reads this tie-point grid's data from its associated data source into the given data buffer. - Specified by:
- readRasterDatain class- RasterDataNode
- Parameters:
- offsetX- the X-offset in the raster co-ordinates where reading starts
- offsetY- the Y-offset in the raster co-ordinates where reading starts
- width- the width of the raster data buffer
- height- the height of the raster data buffer
- rasterData- a raster data buffer receiving the pixels to be read
- pm- a monitor to inform the user about progress
- Throws:
- IOException- if an I/O error occurs
- IllegalArgumentException- if the raster is null
- IllegalStateException- if this product raster was not added to a product so far, or if the product to which this product raster belongs to, has no associated product reader
- See Also:
- ProductReader.readBandRasterData(Band, int, int, int, int, ProductData, com.bc.ceres.core.ProgressMonitor)
 
 - 
readRasterDataFullypublic void readRasterDataFully(ProgressMonitor pm) throws IOException Reads the complete underlying raster data.After this method has been called successfully, hasRasterData()should always returntrueandgetRasterData()should always return a validProductDatainstance with at leastgetRasterWidth()*getRasterHeight()elements (samples).In opposite to the loadRasterDatamethod, thereadRasterDataFullymethod always reloads the data of this product raster, independently of whether its has already been loaded or not.- Specified by:
- readRasterDataFullyin class- RasterDataNode
- Parameters:
- pm- a monitor to inform the user about progress
- Throws:
- IOException- if an I/O error occurs
- See Also:
- RasterDataNode.loadRasterData(),- RasterDataNode.readRasterData(int, int, int, int, ProductData, com.bc.ceres.core.ProgressMonitor)
 
 - 
writeRasterDatapublic void writeRasterData(int offsetX, int offsetY, int width, int height, ProductData rasterData, ProgressMonitor pm) throws IOExceptionWrites data from this product raster into the specified region of the user-supplied raster.It is important to know that this method does not change this product raster's internal state nor does it write into this product raster's internal raster. - Specified by:
- writeRasterDatain class- RasterDataNode
- Parameters:
- offsetX- the X-offset in raster co-ordinates where reading starts
- offsetY- the Y-offset in raster co-ordinates where reading starts
- width- the width of the raster data buffer
- height- the height of the raster data buffer
- rasterData- a raster data buffer receiving the pixels to be read
- pm- a monitor to inform the user about progress
- Throws:
- IOException- if an I/O error occurs
- See Also:
- ProductReader.readBandRasterData(Band, int, int, int, int, ProductData, com.bc.ceres.core.ProgressMonitor)
 
 - 
writeRasterDataFullypublic void writeRasterDataFully(ProgressMonitor pm) throws IOException Writes the complete underlying raster data.- Specified by:
- writeRasterDataFullyin class- RasterDataNode
- Parameters:
- pm- a monitor to inform the user about progress
- Throws:
- IOException- if an I/O error occurs
 
 - 
createSourceImageprotected RenderedImage createSourceImage() Description copied from class:RasterDataNodeCreates the source image associated with thisRasterDataNode. This shall preferably be aMultiLevelImageinstance which recognises this raster data node's {@link ##getImageToModelTransform() imageToModelTransform} property, if set.- Specified by:
- createSourceImagein class- RasterDataNode
- Returns:
- A new source image instance.
 
 - 
acceptVisitorpublic void acceptVisitor(ProductVisitor visitor) 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.The method simply calls visitor.visit(this).- Specified by:
- acceptVisitorin class- RasterDataNode
- Parameters:
- visitor- the visitor
 
 - 
cloneTiePointGridpublic TiePointGrid cloneTiePointGrid() 
 - 
createZenithFromElevationAngleTiePointGridpublic static TiePointGrid createZenithFromElevationAngleTiePointGrid(TiePointGrid elevationAngleGrid) 
 - 
ensureMinLengthArrayprotected static int[] ensureMinLengthArray(int[] array, int length)
 - 
ensureMinLengthArrayprotected static float[] ensureMinLengthArray(float[] array, int length)
 - 
ensureMinLengthArrayprotected static double[] ensureMinLengthArray(double[] array, int length)
 - 
createSubsetpublic static TiePointGrid createSubset(TiePointGrid sourceTiePointGrid, ProductSubsetDef subsetDef) 
 
- 
 
-