[gdal-dev] Meaning of some switches in the gdal utilities

Frank Warmerdam warmerdam at pobox.com
Sun Mar 14 14:00:32 EDT 2010


Theuns Heydenrych wrote:
> HI.
> 
> I am new to the libraries, and would like some more info on some of the
> switches of the utilities.
> 
> I am mainly using the command line utilities. 
> 
> On the gdaltransform utility:
> 1. -rpc: Force use of RPCs.
> a) What does this mean exactly? I can see, the utility is forced to use
> rps's.
> b) What is a rpc, sorry for this stupid question, but please, what does
> it stands for?

Theuns,

RPCs are a way of providing a bunch of coefficients
for a ratio of polynomials that can be evaluated to
transform between pixel/line space and lat/long/elevation
space.  It is used fairly widely provide rough georeferencing
for unrectified satellite imagery.

There is some material on this at:

   http://geotiff.maptools.org/rpc_prop.html

> c) How do i provide these rpc's?

Generally they should be already associated with the input
datasource as metadata.  There are various mechanisms to associate
the appropriate metadata with a dataset including wrapping with a
GDAL VRT and using the -mo flag to gdal_translate.  GDAL does
attempt to read RPC metadata from a variety of supported formats.

> 2. -geoloc: Force use of Geolocation Arrays.
> a) Again i can gather the utility is forced to use geolocation arrays,
> how to a supply these?

There is a discussion of geolocation arrays in RFC 4:

   http://trac.osgeo.org/gdal/wiki/rfc4_geolocate

> b) What is the format for these arrays, comma delimited, space
> delimited, should it be in a file...?

The arrays themselves are in the format of GDAL
supported raster bands - so in theory they can
come from any GDAL supported format.

> 3. -gcp pixel line easting northing [elevation]:
> a) Ok, i could figure this one out, but what does "gcp" stands for, "geo
> control point"?

"Ground Control Point"

It is an association of a location the ground - usually
expressed as a pixel/line location on an image with a geospatial
location, possibly in latitude and longitude.

> On the gdalwarp utility:
> I have only used it once and would realy like to use it to more.
> 1) -cutline datasource:
> a) What will this do for me exactly, will it crop the image for me
> according to a extend in a shapefile?

It can be used to set all pixels outside the cutline to zero,
but it will not generally affect the extents of the output
file image.

> b) Could this be a polygon in a shapefile?

Yes

> I have only used the utilities now for a few days, and are really
> impressed, i could do all my geolocation work with out opening any
> proprietary software(being ArcMap).
> 
> I would like to play more with the utilities, like to merge some of the
> raster data, and cut it up in tiles and do some warping on some of the
> georeferenced raster i down loaded from the net.
> 
> About some of the questions above, may seem very stupid, but hey, i have
> to know some of it, to use the utilities to its full potential.

The questions are not at all stupid.  I will say that "geolocation"
and "RPC" support in GDAL is less widely used than georeferencing
based on geotransform's or gcps.  You may find the documentation
somewhat inadequate, and the workflows challenging (ie. constructing
appropriate metadata).  But with some fortitude you should be able
to accomplish a lot.

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