[Gdal-dev] gdalwarp: difference between -tps and -order 1

Frank Warmerdam warmerdam at pobox.com
Thu Oct 18 22:09:56 EDT 2007


Jan Hartmann wrote:
> OK Frank, that's nice, thanks! How about a filter:
> 
> gdalTransformCps  [ -tps | -order n ] -gcp ix iy ox oy ...
> 
> Input comes from standard input (two numbers per line), and output goes 
> to standard output (idem). A bit like proj actually.

Jan,

I've committed a new "gdaltransform" program in subversion.

Usage: gdaltransform [--help-general]
     [i] [-s_srs srs_def] [-t_srs srs_def] [-order n] ] [-tps]
     [-gcp pixel line easting northing [elevation]]*
     [srcfile [dstfile]]

As suggested it takes in pairs (or triples) of numbers and writes out the
transformed result.   The program attempts to offer most transformations
offered by gdalwarp.  It can be used for reprojection (with -s_srs and
-t_srs), gcp trasnsformations, and anything that gdalwarp would normally
initialize from source and destination files.

If srcfile is specified the transformation will be from source pixel/line
coordinates.

If gcps are provided on the commandline, the transformation will be from
source gcp values (normally pixel line too).

If dstfile is provided output is destination pixel line, otherwise it
will normally be destination georeferenced.

If just -s_srs and -t_srs are provided it georef in s_srs to georef in
d_srs.

If the -i flag is provided the transformation is done in reverse (dest
to source).

Note that input and output must always be in decimal form.  There is currently
no support for DMS input or output.

Are you ok to build this from subversion (or a nightly snapshot) or would
you like binaries prepared?

I would be quite appreciative if you could prepare user documentation
suitable for inclusion in:

   http://trac.osgeo.org/gdal/browser/trunk/gdal/doc/gdal_utilities.dox

after some testing.

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    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list