[gdal-dev] gdalwarp on a separate RPC model

Yi Dong yidong80 at gmail.com
Mon Jun 15 11:18:02 PDT 2015


Dear List,

I have a question about recitify satellite images that has RPC camera 
using gdalwarp.  I know gdalwarp can be used for this task, with using 
RPC metadata (either packed inside the NITF or stored inside RPB files)
Normally, the image folder shall contain following files
input.ntf
input.rpb
input.imd
etc...
The command I used for this is
gdalwarp -rpc input.ntf -to RPC_HEIGHT=200 rectified.tif

Now I performed some geo-correction on the satellite image and generate 
a corrected RPC model (with imporved offset values) and I store this 
correct RPC camera in 'correct.rpb'.  Now I am trying to use this 
'correct.rpb' to recitify the image
I tried
gdalwarp -rpc input.ntf correct.rpb -to RPC_HEIGHT=200 
recitify_corrected.tif
but it failed with following error
ERROR 4: 'correct.rpb' not recognized as a supported file format

Then I tried to overwrite the 'input.rpb' in the image folder with my 
'corrected.rpb', run 'gdalwarp -rpc input.ntf -to RPC_HEIGHT=200 
rectified.tif' again but I got exactly same results as I used the 
original RPC model.  I guess that might be because gdalwarp used RPC 
parameter that was packed inside NITF image itself, instead of getting 
them from rpb files ?

So Is there other way to use my corrected RPC model in gdal, like 
gdalwarp, gdal_transform, etc.?
Also, gdaltransform doesn't not accept RPB files either.  It only 
recognizes GDAL dataset, i.e. vrt file.  Therefore I need to generate 
vrt file from my RPB.  Is there any vrt example for RPC camera that I 
can follow?

Thanks a lot
Ian



More information about the gdal-dev mailing list