7.74 SDO_GEOR.getModelCoordinate

Format

SDO_GEOR.getModelCoordinate(
     georaster      IN SDO_GEORASTER, 
     pyramidLevel   IN NUMBER, 
     cellCoordinate IN SDO_NUMBER_ARRAY, 
     height         IN NUMBER DEFAULT NULL, 
     ) RETURN SDO_GEOMETRY;

or

SDO_GEOR.getModelCoordinate(
     georaster       IN SDO_GEORASTER, 
     pyramidLevel    IN NUMBER, 
     cellCoordinate  IN SDO_GEOMETRY, 
     modelCoordinate OUT SDO_GEOMETRY, 
     height          IN NUMBER DEFAULT NULL);

Description

Returns a geometry associated with the specified cell (raster) coordinates at the specified pyramid level.

Parameters

georaster

GeoRaster object.

pyramidLevel

Pyramid level containing the cell specified in cellCoordinate.

cellCoordinate

If the type is SDO_NUMBER_ARRAY, cellCoordinate is an array of two coordinates identifying the point in the cell coordinate system: the two coordinates are the row number and column number of the point. If the type is SDO_GEOMETRY, cellCoordinate specifies a geometry in the cell coordinate system

modelCoordinate

The output geometry.

height

Number specifying the Z value for three-dimensional (X, Y, Z) georeferencing.

Usage Notes

SDO_GEOR.getModelCoordinate has two formats:

  • Use the first format (a function without the modelCoordinate parameter) to transform the location of a point in the GeoRaster object's raster space.

  • Use the second format (a procedure with the modelCoordinate parameter) to transform a geometry in the raster space of the GeoRaster object. The conversion is done by converting the coordinates of each vertex of the input geometry. Use an appropriate input geometry so that the output geometry will be valid. For example, if the model coordinate system is geodetic, the input geometry should not contain any arcs.

Use SDO_GEOR.getModelCoordinate to transform the location of a point on the GeoRaster object to the longitude and latitude coordinates of its associated point in the ground coordinate system.

If the GeoRaster object is georeferenced, the output geometry contains the coordinates in the model (ground) coordinate system. If the GeoRaster object is not georeferenced, the output geometry contains cell coordinates at the original image level.

If the GeoRaster object is georeferenced, the SDO_SRID value of the output geometry is the same as the model SRID of the GeoRaster object.

Contrast SDO_GEOR.getModelCoordinate with SDO_GEOR.getCellCoordinate, which returns the coordinates in the cell (raster) coordinate system associated with the point at the specified model (ground) coordinates.

Examples

The following example returns a point geometry object containing the model coordinates associated with cell coordinates (100,100) in a specified GeoRaster object. (It refers to a table named GEORASTER_TABLE, whose definition is presented after Example 1-1 in Storage Parameters.)

SET NUMWIDTH 20
SELECT sdo_geor.getModelCoordinate(georaster, 0,
sdo_number_array(100,100)) mcoord
  FROM georaster_table WHERE georid=4;
 
MCOORD(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
 
SDO_GEOMETRY(2001, 82394, SDO_POINT_TYPE(347.666315789474, 43274.9052631579, NUL
L), NULL, NULL)