4.7 Interpolating Cell Values
GeoRaster objects are grid coverages. The "evaluate" operation of a grid coverage is also called grid interpolation, a method for interpolating cell values at point positions between the cells or within the cells. This operation in GeoRaster is performed by the SDO_GEOR.evaluateDouble function, which evaluates any point in the raster and returns a double number value for that location. You can use any one of the six different interpolation methods (listed in Resampling and Interpolation) to do the evaluation. For example, if a georaster object is a DEM layer, you can find out the elevation of a random point location, using the following example:
SELECT SDO_GEOR.evaluateDouble(a.georaster, 0, SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(112.704, 41.917, NULL), NULL, NULL), '1', 'interpolationMethod=BILINEAR') FROM georaster_table a WHERE raster_name='myDEM';
If you call SDO_GEOR.evaluateDouble with 'interpolationMethod=NN'
, the GeoRaster object is treated as a discrete raster and the preceding is the same as calling SDO_GEOR.getCellValue, which gives you the same value (that is, the cell value) at a different point location inside a cell. In this case, you can directly call SDO_GEOR.getCellValue instead, particularly when you query only the cell values of a single band. Other interpolation methods treat the raster as a continuous surface and may give you different values at different point locations inside a cell.
Parent topic: GeoRaster Data Query and Manipulation