Le lundi 15 juin 2015 20:18:02, Yi Dong a écrit : > 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?
Ian, I'd suggesting gdal_translate'ing your input.ntf into a VRT, and replace the values in the "VRT" metadata domain with your own values. Then you can run gdalwarp on this VRT file Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
