Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


oracle.spatial.georaster.sql
Class SdoGeorPKG

java.lang.Object
  extended by oracle.spatial.georaster.sql.SdoGeorPKG


public class SdoGeorPKG
extends java.lang.Object

SdoGeorPKG is a Java class which wraps PL/SQL functions and procedures defined in the server-side package SDO_GEOR. When a method defined in the class is invoked, a corresponding PL/SQL block is generated and submitted to the target Oracle database through a JDBC connection, so that equivalent result by PL/SQL can be achieved from the Java side.

Note that all methods in this class are transactional, which means that no commit statement is issued implicitly in each method.

The following is an example of how to use this class:

   //initialize an instance of SdoGeorPKG
   SdoGeorPKG  pkg=new SdoGeorPKG(connection);
   //reading a GeoRaster object from database based on a query
   ResultSet rs = statement.executeQuery("SELECT a.georaster FROM georaster_table a where a.georaster.rasterdatatable='RDT' and a.georaster.rasterid=1");
   STRUCT geor = (oracle.sql.STRUCT) rs.getObject(1);
   //convert STRUCT into SdoGeoRaster
   SdoGeoRaster sdoGeoRaster = new SdoGeoRaster(geor);
   //change cell value of the GeoRaster object
   pkg.changeCellValue(sdoGeoRaster,10,10,"1",10.0,null);
   //submit change
   connection.commit();

Constructor Summary
SdoGeorPKG(java.sql.Connection conn)
          Constructs an SdoGeorPKG object using the given connection.

 

Method Summary
 double calcCompressionRatio(SdoGeoRaster georaster)
          Computes the compression ratio of the GeoRaster object.
 void changeCellValue(SdoGeoRaster georaster, JGeometry window, java.lang.String layerNumbers, double newCellValue, double[] bgValues)
          Changes the value of raster cells in a specified window of a GeoRaster object to a single new value.
 void changeCellValue(SdoGeoRaster georaster, long startRow, long startColumn, long endRow, long endColumn, java.lang.String bandNumbers, double newCellValue, double[] bgValues)
          Changes the value of raster cells in a specified window of a GeoRaster object to a single new value.
 void changeCellValue(SdoGeoRaster georaster, long row, long column, java.lang.String bandNumbers, double newCellValue, double[] bgValues)
          Changes the value of raster cell in a specified point of a GeoRaster object to a single new value.
 void changeFormatCopy(SdoGeoRaster source, java.lang.String storageParam, SdoGeoRaster target, double[] bgValues)
          Makes a copy of an existing GeoRaster object using a different storage format (for example, changing the blocking, cell depth, or interleaving).
 void copy(SdoGeoRaster source, SdoGeoRaster target)
          Makes a copy of an existing GeoRaster object.
 void deletePyramid(SdoGeoRaster georaster)
          Deletes the pyramid data of a GeoRaster object.
 void generateBlockMBR(SdoGeoRaster georaster)
          Computes the minimum bounding rectangle (MBR) for each block in a GeoRaster object, and sets the blockMBR attribute for each raster block in the raster data table.
 void generatePyramid(SdoGeoRaster georaster, java.lang.String pyramidParams, double[] bgValues)
          Generates pyramid data, which is stored together with the original data.
 JGeometry generateSpatialExtent(SdoGeoRaster georaster, java.lang.Double height)
          Generates a Spatial geometry that contains the spatial extent (footprint) of the GeoRaster object.
 void generateStatistics(SdoGeoRaster georaster, int samplingFactor, JGeometry samplingWindow, boolean histogram, java.lang.String layerNumbers, boolean useBin, double[] binFunction, boolean nodata)
          Computes and sets statistical data associated with one or more layers.
 void generateStatistics(SdoGeoRaster georaster, int samplingFactor, long[] samplingWindow, boolean histogram, java.lang.String layerNumbers, boolean useBin, double[] binFunction, boolean nodata)
          Computes and sets statistical data associated with one or more layers.
 void georeference(SdoGeoRaster georaster, int srid, int modelCoordinateLocation, double[] xCoefficients, double[] yCoefficients)
          Georeferences a GeoRaster object using specified cell-to-model transformation coefficients.
 void getBitmapMask(SdoGeoRaster source, int layer, java.lang.String storageParam, SdoGeoRaster target)
          Updates a specified pyramid of a specified area or the overlapping parts of one GeoRaster object with selected pyramid and selected bands or layers of another GeoRaster object.
 double getBitmapMaskValue(SdoGeoRaster georaster, int pyramidLevel, int rowNumber, int colNumber, int bandNumber)
          Gets the value of a single cell from a bitmap mask.
 double getBitmapMaskValue(SdoGeoRaster georaster, JGeometry ptGeom, int pyramidLevel, int layerNumber)
          Gets the value of a single cell from a bitmap mask.
 double getCellValue(SdoGeoRaster georaster, int pyramidLevel, int rowNumber, int colNumber, int bandNumber)
          Returns the value of a single cell located anywhere in the GeoRaster object by specifying its row, column, and band number in its cell coordinate system and its logical layer number.
 double getCellValue(SdoGeoRaster georaster, JGeometry ptGeom, int pyramidLevel, int layerNumber)
          Returns the value of a single cell located anywhere in the GeoRaster object by specifying a point geometry in its model coordinate system and its logical layer number.
 java.sql.Connection getConnection()
          Returns a connection which points to target database.
 void mergeLayers(SdoGeoRaster source, java.lang.String sourceLayerNumbers, SdoGeoRaster target, double[] bgValues)
          Merges the layers of two GeoRaster objects, either by appending source layers to a target GeoRaster object (first format) or by performing a union operation.
 void mergeLayers(SdoGeoRaster source1, java.lang.String source1LayerNumbers, SdoGeoRaster source2, java.lang.String source2LayerNumbers, java.lang.String storageParam, SdoGeoRaster target, double[] bgValues)
          Merges the layers of two GeoRaster objects, either by appending source layers to a target GeoRaster object (first format) or by performing a union operation.
 void mosaic(java.lang.String georasterTableName, java.lang.String georasterColumnName, SdoGeoRaster target, java.lang.String storageParam, double[] bgValues)
          Mosaics GeoRaster objects into one GeoRaster object.
 void scaleCopy(SdoGeoRaster source, java.lang.String scaleParam, int pyramidLevel, java.lang.String resampleParam, java.lang.String storageParam, SdoGeoRaster target, double[] bgValues)
          Scales a GeoRaster object by enlarging or reducing the image along row and column dimensions, and puts the result into a new object that reflects the scaling.
 void scaleCopy(SdoGeoRaster source, java.lang.String scaleParam, java.lang.String resampleParam, java.lang.String storageParam, SdoGeoRaster target, double[] bgValues)
          Scales a GeoRaster object by enlarging or reducing the image along row and column dimensions, and puts the result into a new object that reflects the scaling.
 void setBitmapMask(SdoGeoRaster source, int layer, SdoGeoRaster target, java.lang.Integer NODATAMask)
          Attaches a bitmap mask to a GeoRaster object, or replaces or removes the current bitmap mask.
 void setConnection(java.sql.Connection conn)
          Sets the connection which points to the target database.
 void subset(SdoGeoRaster source, int pyramid, JGeometry cropArea, java.lang.String layerNumbers, java.lang.String storageParam, SdoGeoRaster target, double[] bgValues)
          Performs either or both of the following operations: (1) spatial crop, cut, or clip, or (2) layer or band subset or duplicate.
 void subset(SdoGeoRaster source, int pyramid, long[] cropArea, java.lang.String layerNumbers, java.lang.String storageParam, SdoGeoRaster target, double[] bgValues)
          Performs either or both of the following operations: (1) spatial crop, cut, or clip, or (2) layer or band subset or duplicate.
 void subset(SdoGeoRaster source, JGeometry cropArea, java.lang.String layerNumbers, java.lang.String storageParam, SdoGeoRaster target, double[] bgValues)
          Performs either or both of the following operations: (1) spatial crop, cut, or clip, or (2) layer or band subset or duplicate.
 void subset(SdoGeoRaster source, long[] cropArea, java.lang.String layerNumbers, java.lang.String storageParam, SdoGeoRaster target, double[] bgValues)
          Performs either or both of the following operations: (1) spatial crop, cut, or clip, or (2) layer or band subset or duplicate.
 void updateRaster(SdoGeoRaster target, int targetPyramidLevel, java.lang.String targetLayerNumbers, JGeometry targetArea, SdoGeoRaster source, int sourcePyramidLevel, java.lang.String sourceLayerNumbers, boolean updateUpperPyramids, double[] bgValues)
          Updates a specified pyramid of a specified area or the overlapping parts of one GeoRaster object with selected pyramid and selected bands or layers of another GeoRaster object.
 void updateRaster(SdoGeoRaster target, int targetPyramidLevel, java.lang.String targetLayerNumbers, long[] targetArea, SdoGeoRaster source, int sourcePyramidLevel, java.lang.String sourceLayerNumbers, boolean updateUpperPyramids, double[] bgValues)
          Updates a specified pyramid of a specified area or the overlapping parts of one GeoRaster object with selected pyramid and selected bands or layers of another GeoRaster object.
 boolean validateBlockMBR(SdoGeoRaster georaster)
          Validates the blockMBR attribute of each block of a GeoRaster object.
 boolean validateGeoRaster(SdoGeoRaster georaster)
          Validates a GeoRaster object, checking its raster data and metadata.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SdoGeorPKG

public SdoGeorPKG(java.sql.Connection conn)
Constructs an SdoGeorPKG object using the given connection.
Parameters:
conn - a JDBC connection.

Method Detail

setConnection

public void setConnection(java.sql.Connection conn)
Sets the connection which points to the target database.
Parameters:
conn - a JDBC connection

getConnection

public java.sql.Connection getConnection()
Returns a connection which points to target database.
Returns:
a connection which points to target database.

changeFormatCopy

public void changeFormatCopy(SdoGeoRaster source,
                             java.lang.String storageParam,
                             SdoGeoRaster target,
                             double[] bgValues)
                      throws java.lang.Exception
Makes a copy of an existing GeoRaster object using a different storage format (for example, changing the blocking, cell depth, or interleaving).
Parameters:
source - source GeoRaster object
storageParam - a string specifying storage parameters
target - target GeoRaster object
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

copy

public void copy(SdoGeoRaster source,
                 SdoGeoRaster target)
          throws java.lang.Exception
Makes a copy of an existing GeoRaster object.
Parameters:
source - source GeoRaster object
target - target GeoRaster object
Throws:
java.lang.Exception

mergeLayers

public void mergeLayers(SdoGeoRaster source,
                        java.lang.String sourceLayerNumbers,
                        SdoGeoRaster target,
                        double[] bgValues)
                 throws java.lang.Exception
Merges the layers of two GeoRaster objects, either by appending source layers to a target GeoRaster object (first format) or by performing a union operation.
Parameters:
source - source GeoRaster object
sourceLayerNumbers - String specifying one or more layer numbers of layers in source GeoRaster object to be appended to target georaster object. Use commas to delimit numbers or ranges, and use a hyphen to indicate a range. Example: '1,3-5,7' for layers 1, 3, 4, 5, and 7.
target - target GeoRaster object
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

mergeLayers

public void mergeLayers(SdoGeoRaster source1,
                        java.lang.String source1LayerNumbers,
                        SdoGeoRaster source2,
                        java.lang.String source2LayerNumbers,
                        java.lang.String storageParam,
                        SdoGeoRaster target,
                        double[] bgValues)
                 throws java.lang.Exception
Merges the layers of two GeoRaster objects, either by appending source layers to a target GeoRaster object (first format) or by performing a union operation.
Parameters:
source1 - the first source GeoRaster object
source1LayerNumbers - String specifying one or more layer numbers of layers in the first source GeoRaster object to be appended to target GeoRaster object. Use commas to delimit numbers or ranges, and use a hyphen to indicate a range. Example: '1,3-5,7' for layers 1,3, 4, 5, and 7.
source2 - the second source GeoRaster object
source2LayerNumbers - String specifying one or more layer numbers of layers in the second source GeoRaster object to be appended to the target GeoRaster object. Use commas to delimit numbers or ranges, and use a hyphen to indicate a range. Example: '1,3-5,7' for layers 1,3, 4, 5, and 7.
storageParam - a string specifying storage parameters
target - target GeoRaster object
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

mosaic

public void mosaic(java.lang.String georasterTableName,
                   java.lang.String georasterColumnName,
                   SdoGeoRaster target,
                   java.lang.String storageParam,
                   double[] bgValues)
            throws java.lang.Exception
Mosaics GeoRaster objects into one GeoRaster object.
Parameters:
georasterTableName - name of the table containing all source GeoRaster objects
georasterColumnName - column of type SDO_GEORASTER in georasterTableName.
target - target GeoRaster object to hold the result of the mosaic operation
storageParam - a string specifying storage parameters
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

scaleCopy

public void scaleCopy(SdoGeoRaster source,
                      java.lang.String scaleParam,
                      java.lang.String resampleParam,
                      java.lang.String storageParam,
                      SdoGeoRaster target,
                      double[] bgValues)
               throws java.lang.Exception
Scales a GeoRaster object by enlarging or reducing the image along row and column dimensions, and puts the result into a new object that reflects the scaling.
Parameters:
source - source GeoRaster objects
scaleParam - a string specifying a scaling parameter keyword and its associated value. The keyword must be scaleFactor or maxDimSize:

scaleFactor: to reduce or enlarge as a multiple of the original size. This keyword must have a numeric value greater than 0 (zero) (for example, 'scaleFactor=0.75'). A value of 1.0 will not change the current size; a value less than 1 will reduce the image; a value greater than 1 will enlarge the image. The number of cells along each dimension is the original number multiplied by scaleFactor. For example, if the scaleFactor value is 2 and the GeoRaster object has X and Y dimensions, the number of cells along each dimension is doubled.

maxDimSize: to specify a size in terms of the maximum number of cells for each dimension. This keyword must have a numeric value for each dimension (for example, 'maxDimSize=(512,512)'). The aspect ratio is not changed.

resampleParam - a string specifying a resampling parameter (for example, 'resampling=NN'). For the current release, the only supported keyword is resampling, and its value must be one of the following:

NN: value of the nearest neighbor cell in the original GeoRaster object

BILINEAR: distance-weighted average of the 4 nearest cells in the original GeoRaster object

AVERAGE4: simple average of the 4 nearest cells in the original GeoRaster object

AVERAGE16: simple average of the 16 nearest cells in the original GeoRaster object

CUBIC: cubic convolution of the 16 nearest cells in the original GeoRaster object

storageParam - a string specifying storage parameters
target - target GeoRaster object to hold the result of the scaleCopy operation.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

scaleCopy

public void scaleCopy(SdoGeoRaster source,
                      java.lang.String scaleParam,
                      int pyramidLevel,
                      java.lang.String resampleParam,
                      java.lang.String storageParam,
                      SdoGeoRaster target,
                      double[] bgValues)
               throws java.lang.Exception
Scales a GeoRaster object by enlarging or reducing the image along row and column dimensions, and puts the result into a new object that reflects the scaling.
Parameters:
source - source GeoRaster objects
scaleParam - a string specifying a scaling parameter keyword and its associated value. The keyword must be scaleFactor or maxDimSize:

scaleFactor: to reduce or enlarge as a multiple of the original size. This keyword must have a numeric value greater than 0 (zero) (for example, 'scaleFactor=0.75'). A value of 1.0 will not change the current size; a value less than 1 will reduce the image; a value greater than 1 will enlarge the image. The number of cells along each dimension is the original number multiplied by scaleFactor. For example, if the scaleFactor value is 2 and the GeoRaster object has X and Y dimensions, the number of cells along each dimension is doubled.

maxDimSize: to specify a size in terms of the maximum number of cells for each dimension. This keyword must have a numeric value for each dimension (for example, 'maxDimSize=(512,512)'). The aspect ratio is not changed.

pyramidLevel - pyramid level
resampleParam - a string specifying a resampling parameter (for example, 'resampling=NN'). For the current release, the only supported keyword is resampling, and its value must be one of the following:

NN: value of the nearest neighbor cell in the original GeoRaster object

BILINEAR: distance-weighted average of the 4 nearest cells in the original GeoRaster object

AVERAGE4: simple average of the 4 nearest cells in the original GeoRaster object

AVERAGE16: simple average of the 16 nearest cells in the original GeoRaster object

CUBIC: cubic convolution of the 16 nearest cells in the original GeoRaster object

storageParam - a string specifying storage parameters
target - target GeoRaster object to hold the result of the scaleCopy operation.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

updateRaster

public void updateRaster(SdoGeoRaster target,
                         int targetPyramidLevel,
                         java.lang.String targetLayerNumbers,
                         long[] targetArea,
                         SdoGeoRaster source,
                         int sourcePyramidLevel,
                         java.lang.String sourceLayerNumbers,
                         boolean updateUpperPyramids,
                         double[] bgValues)
                  throws java.lang.Exception
Updates a specified pyramid of a specified area or the overlapping parts of one GeoRaster object with selected pyramid and selected bands or layers of another GeoRaster object.
Parameters:
target - target GeoRaster object
targetPyramidLevel - pyramid level of target GeoRaster object
targetLayerNumbers - String specifying one or more layer numbers of layers in the target GeoRaster object to be updated. Use commas to delimit numbers or ranges, and use a hyphen to indicate a range. Example: '1,3-5,7' for layers 1, 3, 4, 5, and 7.
targetArea - area to be updated in targetGeoRaster: a rectangular window, specified by a numeric array with the lower-left and upper-right coordinates.
source - source GeoRaster object
sourcePyramidLevel - pyramid level of source GeoRaster object
sourceLayerNumbers - string specifying one or more layer numbers of layers in sourceGeoRaster to be used to update targetGeoRaster. Use commas to delimit numbers or ranges, and use a hyphen to indicate a range. Example: '1,3-5,7' for layers 1, 3, 4, 5, and 7. Any layers that you specify for this parameter must be compatible with the layers to be updated in the target GeoRaster object.
updateUpperPyramids - TRUE or FALSE to specify whether to update upper-level pyramids.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

updateRaster

public void updateRaster(SdoGeoRaster target,
                         int targetPyramidLevel,
                         java.lang.String targetLayerNumbers,
                         JGeometry targetArea,
                         SdoGeoRaster source,
                         int sourcePyramidLevel,
                         java.lang.String sourceLayerNumbers,
                         boolean updateUpperPyramids,
                         double[] bgValues)
                  throws java.lang.Exception
Updates a specified pyramid of a specified area or the overlapping parts of one GeoRaster object with selected pyramid and selected bands or layers of another GeoRaster object.
Parameters:
target - target GeoRaster object
targetPyramidLevel - pyramid level of target GeoRaster object
targetLayerNumbers - String specifying one or more layer numbers of layers in the target GeoRaster object to be updated. Use commas to delimit numbers or ranges, and use a hyphen to indicate a range. Example: '1,3-5,7' for layers 1, 3, 4, 5, and 7.
targetArea - area to be updated in targetGeoRaster.
source - source GeoRaster object
sourcePyramidLevel - pyramid level of source GeoRaster object
sourceLayerNumbers - string specifying one or more layer numbers of layers in sourceGeoRaster to be used to update targetGeoRaster. Use commas to delimit numbers or ranges, and use a hyphen to indicate a range. Example: '1,3-5,7' for layers 1, 3, 4, 5, and 7. Any layers that you specify for this parameter must be compatible with the layers to be updated in the target GeoRaster object.
updateUpperPyramids - TRUE or FALSE to specify whether to update upper-level pyramids.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

subset

public void subset(SdoGeoRaster source,
                   JGeometry cropArea,
                   java.lang.String layerNumbers,
                   java.lang.String storageParam,
                   SdoGeoRaster target,
                   double[] bgValues)
            throws java.lang.Exception
Performs either or both of the following operations: (1) spatial crop, cut, or clip, or (2) layer or band subset or duplicate.
Parameters:
source - source GeoRaster objects
cropArea - crop area definition
layerNumbers - a string identifying the logical layer numbers on which the operation or operations are to be performed. Use commas to delimit the values, and a hyphen to indicate a range (for example, 2-4 for layers 2, 3, and 4).
storageParam - a string specifying storage parameters
target - target GeoRaster object to hold the result of the subset operation.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

subset

public void subset(SdoGeoRaster source,
                   int pyramid,
                   JGeometry cropArea,
                   java.lang.String layerNumbers,
                   java.lang.String storageParam,
                   SdoGeoRaster target,
                   double[] bgValues)
            throws java.lang.Exception
Performs either or both of the following operations: (1) spatial crop, cut, or clip, or (2) layer or band subset or duplicate.
Parameters:
source - source GeoRaster objects
pyramid - pyramid level
cropArea - crop area definition
layerNumbers - a string identifying the logical layer numbers on which the operation or operations are to be performed. Use commas to delimit the values, and a hyphen to indicate a range (for example, 2-4 for layers 2, 3, and 4).
storageParam - a string specifying storage parameters
target - target GeoRaster object to hold the result of the subset operation.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

subset

public void subset(SdoGeoRaster source,
                   long[] cropArea,
                   java.lang.String layerNumbers,
                   java.lang.String storageParam,
                   SdoGeoRaster target,
                   double[] bgValues)
            throws java.lang.Exception
Performs either or both of the following operations: (1) spatial crop, cut, or clip, or (2) layer or band subset or duplicate.
Parameters:
source - source GeoRaster objects
cropArea - crop area definition
layerNumbers - a string identifying the logical layer numbers on which the operation or operations are to be performed. Use commas to delimit the values, and a hyphen to indicate a range (for example, 2-4 for layers 2, 3, and 4).
storageParam - a string specifying storage parameters
target - target GeoRaster object to hold the result of the subset operation.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

subset

public void subset(SdoGeoRaster source,
                   int pyramid,
                   long[] cropArea,
                   java.lang.String layerNumbers,
                   java.lang.String storageParam,
                   SdoGeoRaster target,
                   double[] bgValues)
            throws java.lang.Exception
Performs either or both of the following operations: (1) spatial crop, cut, or clip, or (2) layer or band subset or duplicate.
Parameters:
source - source GeoRaster objects
pyramid - pyramid level
cropArea - crop area definition
layerNumbers - a string identifying the logical layer numbers on which the operation or operations are to be performed. Use commas to delimit the values, and a hyphen to indicate a range (for example, 2-4 for layers 2, 3, and 4).
storageParam - a string specifying storage parameters
target - target GeoRaster object to hold the result of the subset operation.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

Throws:
java.lang.Exception

georeference

public void georeference(SdoGeoRaster georaster,
                         int srid,
                         int modelCoordinateLocation,
                         double[] xCoefficients,
                         double[] yCoefficients)
                  throws java.lang.Exception
Georeferences a GeoRaster object using specified cell-to-model transformation coefficients.
Parameters:
georaster - the SDO_GEORASTER object to be georeferenced
srid - model coordinate system. Must not be null or 0 (zero). It can be a value from the SRID column of the MDSYS.CS_SRS table. If it is not a value from the SRID column of the MDSYS.CS_SRS table, the SRID is not supported by Oracle Spatial, and some SRID-related operations may not be supported.
modelCoordinateLocation - a value specifying the model location of the base of the area represented by a cell: 0 for CENTER or 1 for UPPERLEFT.
xCoefficients - an array specifying the A, B, and C coefficient values in the calculation
yCoefficients - an array specifying the D, E, and F coefficient values in the calculation
Throws:
java.lang.Exception

getBitmapMask

public void getBitmapMask(SdoGeoRaster source,
                          int layer,
                          java.lang.String storageParam,
                          SdoGeoRaster target)
                   throws java.lang.Exception
Updates a specified pyramid of a specified area or the overlapping parts of one GeoRaster object with selected pyramid and selected bands or layers of another GeoRaster object.
Parameters:
source - source GeoRaster object
layer - the layer on which to perform the operation. A value of 0 (zero) indicates the object layer.
storageParam - a string specifying storage parameters
target - target GeoRaster object
Throws:
java.lang.Exception

setBitmapMask

public void setBitmapMask(SdoGeoRaster source,
                          int layer,
                          SdoGeoRaster target,
                          java.lang.Integer NODATAMask)
                   throws java.lang.Exception
Attaches a bitmap mask to a GeoRaster object, or replaces or removes the current bitmap mask.
Parameters:
source - source GeoRaster object
layer - the layer on which to perform the operation. A value of 0 (zero) indicates the object layer.
target - target GeoRaster object
NODATAMask - Specifies 0 if mask is not to be interpreted as a NODATA mask, or 1 if mask is to be interpreted as a NODATA mask.
Throws:
java.lang.Exception

deletePyramid

public void deletePyramid(SdoGeoRaster georaster)
                   throws java.lang.Exception
Deletes the pyramid data of a GeoRaster object.
Parameters:
georaster - GeoRaster object
Throws:
java.lang.Exception

generatePyramid

public void generatePyramid(SdoGeoRaster georaster,
                            java.lang.String pyramidParams,
                            double[] bgValues)
                     throws java.lang.Exception
Generates pyramid data, which is stored together with the original data.
Parameters:
georaster - GeoRaster object
pyramidParams - a string containing the pyramid parameters. pyramidParams must be a quoted string that contains one or more of the following keywords, each with an appropriate value:

rLevel (for example, rLevel=2): Specifies the maximum reduction level: the number of pyramid levels to create at a smaller (reduced) size than the original object. If you do not specify this keyword, pyramid levels are generated until the smaller of the number of rows or columns is between 64 and 128. The dimension sizes at each lower resolution level are equal to the truncated integer values of the dimension sizes at the next higher resolution level, divided by 2.

resampling (for example, resampling=NN): Specifies the resampling method. Must be one of the following: NN (value of the nearest neighbor cell in the original GeoRaster object), BILINEAR (distance-weighted average of the 4 nearest cells in the original GeoRaster object), AVERAGE4 (simple average of the 4 nearest cells in the original GeoRaster object), AVERAGE16 (simple average of the 16 nearest cells in the original GeoRaster object), CUBIC (cubic convolution of the 16 nearest cells in the original GeoRaster object).

nodata (for example, nodata=TRUE): Specifies whether NODATA values and value ranges should be considered during the procedure. Must be either TRUE (NODATA values and value ranges should be considered) or FALSE (NODATA values and value ranges should not be considered). The default value is FALSE. If the value is TRUE and the resampling method is BILINEAR, AVERAGE4, AVERAGE16 or CUBIC, whenever a cell value involved in the resampling calculation is a NODATA value, the result of the resampling is also a NODATA value. The resulting NODATA value is the minimum NODATA value associated with the current raster layer, if multiple NODATA values or value ranges exist.

bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks.

The number of elements must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively).

Throws:
java.lang.Exception

generateBlockMBR

public void generateBlockMBR(SdoGeoRaster georaster)
                      throws java.lang.Exception
Computes the minimum bounding rectangle (MBR) for each block in a GeoRaster object, and sets the blockMBR attribute for each raster block in the raster data table.
Parameters:
georaster - GeoRaster object
Throws:
java.lang.Exception

generateStatistics

public void generateStatistics(SdoGeoRaster georaster,
                               int samplingFactor,
                               long[] samplingWindow,
                               boolean histogram,
                               java.lang.String layerNumbers,
                               boolean useBin,
                               double[] binFunction,
                               boolean nodata)
                        throws java.lang.Exception
Computes and sets statistical data associated with one or more layers.
Parameters:
georaster - source GeoRaster object.
samplingFactor - Sampling factor in the format 'samplingFactor=n', with the denominator n in 1/(n*n) representing the number of cells skipped in both row and column dimensions in computing the statistics. For example, if samplingFactor is 4, one-sixteenth of the cells are sampled; but if samplingFactor is 1, all cells are sampled. The higher the value, the less accurate the statistics are likely to be, but the more quickly they will be computed.
samplingWindow - sampling window: a rectangular window for which to set statistics, specified as a numeric array with the lower-left and upper-right coordinates. The window must be inside the extent in cell space. A null value for this parameter indicates the entire image.
histogram - Specify TRUE to cause a histogram to be computed and stored, or FALSE to cause a histogram not to be computed and stored.
layerNumbers - Numbers of the layers for which to compute the statistics. This is a string that can include numbers, number ranges indicated by hyphens (-), and commas to separate numbers and number ranges. For example, '1,3-5,7' specifies layers 1, 3, 4, 5, and 7. Layer 0 (zero) indicates the object layer.
useBin - Specifies whether or not to use a provided bin function (specified in the binFunction parameter) when generating statistics. TRUE (the default) causes a bin function to be used as follows: (1) the bin function specified by the binFunction parameter, if it is not null; otherwise, (2) the bin function specified by the <binFunction> element in the GeoRaster XML metadata, if one is specified; otherwise, (3) a dynamically generated bin function, as explained in the Usage Notes. FALSE causes a dynamically generated bin function to be used, and causes the binFunction parameter and <binFunction> element to be ignored.For information about bin functions, see the Usage Notes for the SDO_GEOR.setBinFunction procedure.
binFunction - Bin function as an array whose elements specify the bin type, total number of bins, first bin number, minimum cell value, and maximum cell value. The SDO_NUMBER_ARRAY type is defined as VARRAY(1048576) OF NUMBER. For more information about the bin function for SQO_GEOR.generateStatistics, see the Usage Notes. For information about bin functions and an example, see the Usage Notes for the SDO_GEOR.setBinFunction procedure.
nodata - Specifies whether or not to compare each cell values with NODATA values defined in the metadata when computing statistics. TRUE causes all pixels with a NODATA value not to be considered; FALSE (the default) causes pixels with NODATA values to be considered as regular pixels.
Throws:
java.lang.Exception

generateStatistics

public void generateStatistics(SdoGeoRaster georaster,
                               int samplingFactor,
                               JGeometry samplingWindow,
                               boolean histogram,
                               java.lang.String layerNumbers,
                               boolean useBin,
                               double[] binFunction,
                               boolean nodata)
                        throws java.lang.Exception
Computes and sets statistical data associated with one or more layers.
Parameters:
georaster - source GeoRaster object.
samplingFactor - Sampling factor in the format 'samplingFactor=n', with the denominator n in 1/(n*n) representing the number of cells skipped in both row and column dimensions in computing the statistics. For example, if samplingFactor is 4, one-sixteenth of the cells are sampled; but if samplingFactor is 1, all cells are sampled. The higher the value, the less accurate the statistics are likely to be, but the more quickly they will be computed.
samplingWindow - sampling window: a rectangular window for which to set statistics, specified as an SDO_GEOMETRY object. The window must be inside the extent in cell space. A null value for this parameter indicates the entire image.
histogram - Specify TRUE to cause a histogram to be computed and stored, or FALSE to cause a histogram not to be computed and stored.
layerNumbers - numbers of the layers for which to compute the statistics. This is a string that can include numbers, number ranges indicated by hyphens (-), and commas to separate numbers and number ranges. For example, '1,3-5,7' specifies layers 1, 3, 4, 5, and 7. Layer 0 (zero) indicates the object layer.
useBin - Specifies whether or not to use a provided bin function (specified in the binFunction parameter) when generating statistics. TRUE (the default) causes a bin function to be used as follows: (1) the bin function specified by the binFunction parameter, if it is not null; otherwise, (2) the bin function specified by the <binFunction> element in the GeoRaster XML metadata, if one is specified; otherwise, (3) a dynamically generated bin function, as explained in the Usage Notes. FALSE causes a dynamically generated bin function to be used, and causes the binFunction parameter and <binFunction> element to be ignored.For information about bin functions, see the Usage Notes for the SDO_GEOR.setBinFunction procedure.
binFunction - Bin function as an array whose elements specify the bin type, total number of bins, first bin number, minimum cell value, and maximum cell value. The SDO_NUMBER_ARRAY type is defined as VARRAY(1048576) OF NUMBER. For more information about the bin function for SQO_GEOR.generateStatistics, see the Usage Notes. For information about bin functions and an example, see the Usage Notes for the SDO_GEOR.setBinFunction procedure.
nodata - Specifies whether or not to compare each cell values with NODATA values defined in the metadata when computing statistics. TRUE causes all pixels with a NODATA value not to be considered; FALSE (the default) causes pixels with NODATA values to be considered as regular pixels.
Throws:
java.lang.Exception

calcCompressionRatio

public double calcCompressionRatio(SdoGeoRaster georaster)
                            throws java.lang.Exception
Computes the compression ratio of the GeoRaster object.
Parameters:
georaster - source GeoRaster object
Returns:
the compression ratio of the given GeoRaster object.
Throws:
java.lang.Exception

generateSpatialExtent

public JGeometry generateSpatialExtent(SdoGeoRaster georaster,
                                       java.lang.Double height)
                                throws java.lang.Exception
Generates a Spatial geometry that contains the spatial extent (footprint) of the GeoRaster object.
Parameters:
georaster - source GeoRaster object
height - number specifying the Z value for three-dimensional (X, Y, Z) georeferencing. For two-dimensional georeferencing, use null.
Returns:
a JGeometry object that contains the spatial extent (footprint) of the GeoRaster object.
Throws:
java.lang.Exception

validateBlockMBR

public boolean validateBlockMBR(SdoGeoRaster georaster)
                         throws java.lang.Exception
Validates the blockMBR attribute of each block of a GeoRaster object.
Parameters:
georaster - source GeoRaster object
Returns:
true or false to indicate if the blockMBR attribute of the given GeoRaster object is valid.
Throws:
java.lang.Exception

validateGeoRaster

public boolean validateGeoRaster(SdoGeoRaster georaster)
                          throws java.lang.Exception
Validates a GeoRaster object, checking its raster data and metadata.
Parameters:
georaster - source GeoRaster object
Returns:
true or false to indicate if the given GeoRaster object is valid.
Throws:
java.lang.Exception

changeCellValue

public void changeCellValue(SdoGeoRaster georaster,
                            long row,
                            long column,
                            java.lang.String bandNumbers,
                            double newCellValue,
                            double[] bgValues)
                     throws java.lang.Exception
Changes the value of raster cell in a specified point of a GeoRaster object to a single new value.
Parameters:
georaster - source GeoRaster object
row - row of the point where the values is changed to newCellValue
column - column of the point where the values is changed to newCellValue
bandNumbers - a string identifying the physical band numbers on which the operation is to be performed. Use commas to delimit the values, and a hyphen to indicate a range (for example, 1-3 for bands 1, 2, and 3).
newCellValue - the new cell value for each cell inside the window in the specified bands or layers. The value must be in the range designated by the cellDepth value for the GeoRaster object.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks. The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.
Throws:
java.lang.Exception

changeCellValue

public void changeCellValue(SdoGeoRaster georaster,
                            long startRow,
                            long startColumn,
                            long endRow,
                            long endColumn,
                            java.lang.String bandNumbers,
                            double newCellValue,
                            double[] bgValues)
                     throws java.lang.Exception
Changes the value of raster cells in a specified window of a GeoRaster object to a single new value.
Parameters:
georaster - source GeoRaster object.
startRow - startRow of the window in which to change the values of all cells to newCellValue
startColumn - startColumn of the window in which to change the values of all cells to newCellValue
endRow - endRow of the window in which to change the values of all cells to newCellValue
endColumn - endColumn of the window in which to change the values of all cells to newCellValue
bandNumbers - A string identifying the physical band numbers on which the operation is to be performed. Use commas to delimit the values, and a hyphen to indicate a range (for example, 1-3 for bands 1, 2, and 3).
newCellValue - The new cell value for each cell inside the window in the specified bands or layers. The value must be in the range designated by the cellDepth value for the GeoRaster object.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks. The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.
Throws:
java.lang.Exception

changeCellValue

public void changeCellValue(SdoGeoRaster georaster,
                            JGeometry window,
                            java.lang.String layerNumbers,
                            double newCellValue,
                            double[] bgValues)
                     throws java.lang.Exception
Changes the value of raster cells in a specified window of a GeoRaster object to a single new value.
Parameters:
georaster - source GeoRaster object.
window - window in which to change the values of all cells to newCellValue
layerNumbers - a string identifying the logical layer numbers on which the operation is to be performed. Use commas to delimit the values, and a hyphen to indicate a range (for example, 2-4 for layers 2, 3, and 4).
newCellValue - the new cell value for each cell inside the window in the specified bands or layers. The value must be in the range designated by the cellDepth value for the GeoRaster object.
bgValues - background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks. The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.
Throws:
java.lang.Exception

getCellValue

public double getCellValue(SdoGeoRaster georaster,
                           JGeometry ptGeom,
                           int pyramidLevel,
                           int layerNumber)
                    throws java.lang.Exception
Returns the value of a single cell located anywhere in the GeoRaster object by specifying a point geometry in its model coordinate system and its logical layer number.
Parameters:
georaster - source GeoRaster object
pyramidLevel - pyramid level containing the cell whose value is to be returned
ptGeom - point geometry that identifies the cell whose value is to be returned
layerNumber - number of the logical layer that contains the cell whose value is to be returned. (The logical layer number is the physical band number plus 1.)
Returns:
cellValue.
Throws:
java.lang.Exception

getCellValue

public double getCellValue(SdoGeoRaster georaster,
                           int pyramidLevel,
                           int rowNumber,
                           int colNumber,
                           int bandNumber)
                    throws java.lang.Exception
Returns the value of a single cell located anywhere in the GeoRaster object by specifying its row, column, and band number in its cell coordinate system and its logical layer number.
Parameters:
georaster - source GeoRaster object
pyramidLevel - pyramid level containing the cell whose value is to be returned
rowNumber - number of the row that contains the cell whose value is to be returned
colNumber - number of the column that contains the cell whose value is to be returned
bandNumber - number of the physical band that contains the cell whose value is to be returned
Returns:
cellValue.
Throws:
java.lang.Exception

getBitmapMaskValue

public double getBitmapMaskValue(SdoGeoRaster georaster,
                                 JGeometry ptGeom,
                                 int pyramidLevel,
                                 int layerNumber)
                          throws java.lang.Exception
Gets the value of a single cell from a bitmap mask.
Parameters:
georaster - source GeoRaster object
pyramidLevel - pyramid level containing the cell whose value is to be returned
ptGeom - point geometry that identifies the cell whose value is to be returned
layerNumber - number of the logical layer that contains the cell whose value is to be returned. (The logical layer number is the physical band number plus 1.)
Returns:
cellValue.
Throws:
java.lang.Exception

getBitmapMaskValue

public double getBitmapMaskValue(SdoGeoRaster georaster,
                                 int pyramidLevel,
                                 int rowNumber,
                                 int colNumber,
                                 int bandNumber)
                          throws java.lang.Exception
Gets the value of a single cell from a bitmap mask.
Parameters:
georaster - source GeoRaster object
pyramidLevel - pyramid level containing the cell whose value is to be returned
rowNumber - number of the row that contains the cell whose value is to be returned
colNumber - number of the column that contains the cell whose value is to be returned
bandNumber - number of the physical band that contains the cell whose value is to be returned
Returns:
cellValue.
Throws:
java.lang.Exception

Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


Copyright © 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.