Returns the rational polynomial coefficient (RPC) parameters 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
ST_RPCGeoreference returns a JSON string containing the RPC parameters that describe the spatial reference model of the raster object. The following table lists the fields in the returned JSON string.
| 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 | The number of coefficients for a line denominator. Valid values: 1 to 20. |
lineNumCoeff | float array | The number of coefficients for a line numerator. Valid values: 1 to 20. |
sampNumCoeff | float array | The number of coefficients for a sample numerator. Valid values: 1 to 20. |
sampDenCoeff | float array | The number of coefficients for a sample denominator. Valid values: 1 to 20. |
errBias | float | The root mean square (RMS) bias error in meters, calculated across all points on the horizontal axis of the image. Default value: -1.0. |
errRandom | float | The RMS random error in meters, calculated per point on the horizontal axis of the image. Default value: -1.0. |
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]}