[gdal-dev] gdalwarp on a separate RPC model

Dmitry Baryshnikov bishop.dev at gmail.com
Mon Jun 15 11:35:29 PDT 2015


Hi Yi,

GDAL use the RPC which it report by gdalinfo. If gdalinfo reports old 
RPC, you have to clean them from dataset. It seem's to me that rpb 
(*_rpc.txt, etc.) files accepted only on GeoTIFF and TILL formats. On 
GDAL 2.0 also jp2 added. So NITF is not a right format for use external 
RPC. So, first of all try to gdal_translate you format to GTiff, and 
than try to create so-name rpb file.

Best regards,
     Dmitry

15.06.2015 21:18, Yi Dong пишет:
> 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
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>



More information about the gdal-dev mailing list