[gdal-dev] gdalwarp, by reading .RPB file

Patrick Young patrick.mckendree.young at gmail.com
Wed Jan 15 14:12:30 PST 2020

Hi Elmir,

RPCs are just an approximation to the underlying camera model via rational
polynomials; so just a pair of functions that go from XYZ world coordinates
to line/sample in the image.  To make an orthophoto, you first figure out
where the orthophoto is located on the earth, and at each projected xy
coordinate, you look up your height at that coordinate in the DEM and
project back to image space using the camera model (RPCs in this case).

GDAL can do this for you, as you know.  You can feed GDAL DEM to use via
the RPC_DEM option to gdalwarp; you can find some examples at
http://fwarmerdam.blogspot.com/2013/09/exploring-rpcs.html .

One thing that is easy to forget about is handling the verical datum
correctly.  Often times, DEM heights are relative to the geoid, but you
usually need the heights relative to the ellipsoid when you make your
orthophoto.  GDAL can do the conversion for you if you specify the vertical
datum right, although I usually mess it up!

Hope that helps,

On Wed, Jan 15, 2020 at 1:49 PM elmir <elmirgeo at protonmail.com> wrote:

> Hi Patrick,
> Thank you very much for your idea. So, it is using the RPC.
> Could you little explain me what the RPC does with DEM to orthorectify the
> image?
> Thanks a lot.
> Elmir
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Wednesday, January 15, 2020 11:13 AM, Patrick Young <
> patrick.mckendree.young at gmail.com> wrote:
> Hi Elmir,
> When you run gdalinfo against the tif, it should report what files it's
> using to generate the summary info, including rpcs.  I believe gdal
> actually checks for rpcs in a few places, the XML file, maybe the IMD file,
> and also the RPB file.
> You can figure it out by moving these auxiliary files elsewhere and
> rerunning gdalinfo, seeing what changes.
> Hope that helps!
> Patrick
> On Tue, Jan 14, 2020, 4:55 PM elmir <elmirgeo at protonmail.com> wrote:
>> Hello GDAL Developer,
>> I was trying to orthorectify World View 4 raster image using the gdalwarp.
>> I used '-rpc' with the input of DEM file.
>> However, I am wondering whether this method of orthorectification is
>> making use of the ".RBP" file data available with the World View image OR
>> is it just warping with the input DEM file without reading the ".RPB" file
>> contents?
>> How can I make it read the ".RPB" file during gdalwarp/orthorectification?
>> Thank you for your support.
>> Best
>> Elmir
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200115/0d454e47/attachment.html>

More information about the gdal-dev mailing list