[Gdal-dev] Reading RPC

Frank Warmerdam fwarmerdam at gmail.com
Mon Mar 28 22:57:34 EST 2005


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