Returns a JSON string containing the rational polynomial coefficients (RPCs) of a raster object. If the raster object contains no RPC information, the function returns null.
Syntax
text ST_RPCGeoreference(raster raster_obj)Parameters
| Parameter | Type | Description |
|---|---|---|
raster_obj | raster | The raster object to query. |
Return value
A JSON string with the following fields. All scalar values are floats; all coefficient fields are float arrays.
| Field | Type | Description |
|---|---|---|
lineOff | float | The line offset. |
sampOff | float | The sampling offset. |
latOff | float | The latitude offset. |
longOff | float | The longitude offset. |
heightOff | float | The height offset. |
lineScale | float | The line ratio. |
sampScale | float | The sampling ratio. |
latScale | float | The latitude ratio. |
longScale | float | The longitude ratio. |
heightScale | float | The height ratio. |
lineDenCoeff | float array | Line denominator coefficients. Valid values: 1 to 20. |
lineNumCoeff | float array | Line numerator coefficients. Valid values: 1 to 20. |
sampNumCoeff | float array | Sample numerator coefficients. Valid values: 1 to 20. |
sampDenCoeff | float array | Sample denominator coefficients. Valid values: 1 to 20. |
errBias | float | RMS bias errors in meters. These errors are related to all points per horizontal axis in an image. Default: -1.0. |
errRandom | float | RMS random errors in meters. These errors are related to each point per horizontal axis in an image. Default: -1.0. |
errBiasanderrRandomdefault to-1.0, which indicates that no error estimate is available for the raster object.
Example
SELECT ST_RPCGeoreference(raster_obj) FROM raster_table WHERE id = 1;Output:
{
"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, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
"lineNumCoeff": [-0.002104832, -0.01642616, -1.027459, 0.0041820025, -0.0019027952, 0.000016143133, 0.00047863558, -0.00021278669, 0.0069588307, -0.0000022605722, -2.2259552e-7, -3.7469372e-7, 0.00046486457, -1.8012888e-8, 0.000051407583, 0.00075661479, -5.4524409e-7, 1.3940799e-7, -0.000018281596, 2.4215581e-9],
"sampDenCoeff": [1.0, -0.00050066513, -0.0014578309, 0.00060374744, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
"sampNumCoeff": [1.0, -0.00050066513, -0.0014578309, 0.00060374744, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
}In this example, errBias and errRandom are both -1.0, which means the raster object has no error estimates stored.