[Gdal-dev] NITF RPCs
Frank Warmerdam
warmerdam at pobox.com
Tue Feb 21 10:51:42 EST 2006
Combs, Nathan wrote:
>>From the archives it seems that gdal handles NITF RPCs to at least
> *some* extent. Not clear how to work with it, however. Can anyone cite
> any examples, or write-ups anywhere?
>
> Two part question:
>
> 1.) how to extract the RPC from NITF?
Nathan,
The RPC information is returned from the driver as metadata.
For instance, for one dataset I have, gdalinfo includes the following
in the metadata report:
RPC_LINE_OFF=2520
RPC_LINE_SCALE=2520
RPC_SAMP_OFF=2504
RPC_SAMP_SCALE=2505
RPC_LONG_OFF=-117.1253
RPC_LONG_SCALE=0.0622
RPC_LAT_OFF=32.7202
RPC_LAT_SCALE=0.0244
RPC_HEIGHT_OFF=90
RPC_HEIGHT_SCALE=277
RPC_LINE_NUM_COEFF=-2906467 2550845 -999999900 -24324910 -35468.84 7819.843
700675.7 -633405.3 -2407600 19543.19 1318.781 -13.44203 -731.5636 39.28982
-6527.369 2123.481 234.6173 -3291.144 1635.182 3.829373
RPC_LINE_DEN_COEFF=931676200 39787.48 2241341 -621650.7 677.63 -928.6143
-1179.904 4434.102 -1982.792 -248.3078 -0.2481073 -0.1339328
0.08416543999999999 0.2657089 1.047481 -0.3806082 -0.09638633000000001
-4.24534 0.6259711 0.07214144
RPC_SAMP_NUM_COEFF=412778500 999999900 1522162 -1892980 2133668 -218199
-61598.93 44277.24 575.8538 -1073.874 -166.3197 4842.217 -2873.551 -384.2591
718.42 -0.8920386 16.96099 -675.8154 -138.0064 1.187869
RPC_SAMP_DEN_COEFF=429693600 18350.18 1033717 -286708.3 312.5263 -428.2814
-544.1772999999999 2045.029 -914.4731 -114.5207 -0.1144283 -0.06177044
0.03881751 0.1225462 0.4831034 -0.1755384 -0.04445384 -1.957971 0.2887009
0.03327198
RPC_MIN_LONG=-117.1564
RPC_MAX_LONG=-117.0942
RPC_MIN_LAT=32.708
RPC_MAX_LAT=32.7324
There is a GDALRPCInfo structure and it can be populated
from metadata with the GDALExtractRPCInfo() function. This
is not really considered fully supported though, and is not
documented.
> 2.) and if able, how to transform raster using RPC?
There is an RPC transformer that works with gdalwarp, but
currently it does not actually pull in the elevation values
so the results are bogus. At best useful for coarse geolocation.
The RPC support was added so SilverEye could access the RPCs in
NITF files, but it has all it's own infrastructure to handle them.
The RPC transform stuff I did was mostly so I could do a few
experiments on my own.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list