Returns the rational polynomial coefficients (RPC) of a raster object as a JSON string. Returns null if the raster object contains no RPC information.
Syntax
text ST_RPCGeoreference(raster raster_obj)Parameters
| Parameter | Description |
|---|---|
raster_obj | The raster object. |
Description
The returned JSON string contains the RPC parameters that describe the georeferencing model for the raster.
The following table describes the supported JSON fields.
| Field | Description | Type | Valid values |
|---|---|---|---|
lineOff | The line offset. | float | — |
sampOff | The sampling offset. | float | — |
latOff | The latitude offset. | float | — |
longOff | The longitude offset. | float | — |
heightOff | The height offset. | float | — |
lineScale | The line ratio. | float | — |
sampScale | The sampling ratio. | float | — |
latScale | The latitude ratio. | float | — |
longScale | The longitude ratio. | float | — |
heightScale | The height ratio. | float | — |
lineDenCoeff | The number of coefficients for a line denominator. | float array | 1 to 20 |
lineNumCoeff | The number of coefficients for a line numerator. | float array | 1 to 20 |
sampNumCoeff | The number of coefficients for a sample numerator. | float array | 1 to 20 |
sampDenCoeff | The number of coefficients for a sample denominator. | float array | 1 to 20 |
errBias | The bias errors. Root-mean-square (RMS) bias error in meters per horizontal axis, across all points in the image. Default: -1.0 (unknown). | float | — |
errRandom | The random errors. RMS random error in meters per horizontal axis, for each point in the image. Default: -1.0 (unknown). | float | — |
Example
SELECT ST_RPCGeoreference(raster_obj) FROM raster_table WHERE id = 1;The output is a JSON string. The coefficient arrays (lineDenCoeff, lineNumCoeff, sampDenCoeff, sampNumCoeff) each contain 20 float values, shown here in abbreviated form.
{
"lineOff": 12800.0,
"sampOff": 4008.0,
"latOff": 55.0203,
"longOff": 27.0478,
"heightOff": 179.0,
"lineScale": 12800.0,
"sampScale": 4008.0,
"latScale": 0.1238,
"longScale": 0.0685,
"heightScale": 300.0,
"errBias": -1.0,
"errRandom": -1.0,
"lineDenCoeff": [1.0, -0.00050066513, -0.0014578309, 0.0006037474, 0.0, ..., 0.0],
"lineNumCoeff": [-0.002104832, -0.01642616, -1.027459, 0.0041820025, ..., 2.4215581e-9],
"sampDenCoeff": [1.0, -0.00050066513, -0.0014578309, 0.00060374744, 0.0, ..., 0.0],
"sampNumCoeff": [1.0, -0.00050066513, -0.0014578309, 0.00060374744, 0.0, ..., 0.0]
}