[Gdal-dev] Reading RPC
Peng Gao
pgao at esri.com
Wed Apr 6 17:18:16 EDT 2005
Thanks Frank.
Have another question.
I got some tiff images with RPC from Space Imaging. But the RPC
are stored in a separate txt file, instead of as tiff tags.
If the tiff file name is
x.tif, then the RPC text file name is x_rpc.txt. Can GDAL read RPC
from the text file? How can I tell GDAL the txt file is associated
with the tiff image?
I opened the image, x.tif, and GDAL says it has geotransform but
no RPC.
Thanks,
Gao, Peng
> -----Original Message-----
> From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]
> Sent: Monday, March 28, 2005 7:58 PM
> To: Peng Gao
> Cc: GDAL-dev list
> Subject: Re: [Gdal-dev] Reading RPC
>
> On Fri, 25 Mar 2005 11:51:02 -0800, Peng Gao <pgao at esri.com> wrote:
> >
> >
> >
> > If I have an image with RPC (e.g. a NITF image from Space Imaging), how
> do
> > I read the RPC
> >
> > information via GDAL? Is there a function similar to Set/GetGCPs() for
> RPC?
>
> Peng,
>
> The RPC information is transported as Metadata text. You can use the
> GDALExtractRPCInfo() function to extract the metadata and build it into
> a GDALRPCInfo structure suitable for examination or use with the GDAL
> RPC functions.
>
> You could do something like this:
>
> char **papszMD;
> GDALRPCInfo sRPC;
>
> papszMD = GDALGetMetadata(hSrcDS,"");
> if( GDALExtractRPCInfo( papszMD, &sRPC ) )
> printf( "Got RPC Info\n" );
>
> 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