[FWTools] gdal geotiff help - can't do simple affine transform..?

Mark Amend Mark.Amend at noaa.gov
Wed Dec 13 16:47:54 EST 2006

Hi there folks-

I need a bit of help here.  I know there are other ways to do this, but 
I was hoping I could do it with gdal utility tools.  Here's the 
situation:  I have a tif (test.tif) into which I inserted two gcps as 

$ gdal_translate -gcp 722.00 -14314.00 68470.3295 6115827.932 -gcp 
8059.47 -1095.20 68458.758 6115826.179 -a_srs 'EPSG:32604' 
t_A04_447-620_A.bmp test.tif

Using the origin of the tif in the upper left corner (right?) the 
ModelTiepointTag GCPs are listed properly in the header (at bottom of 
this post).  So far, so good?

I then would like to warp the tif into the PCS defined, using the GCPs 
provided.  The image basically needs and affine transformation to be 
rotated and scaled to fit.  Easy to do in ArcGIS with the Georeferencing 

gdalwarp will not recognize that a first-order transformation is needed, 
and even setting the flag "-order 1" doesn't work, either.  I thought it 
would recognize that I have two control points and thus a first-order 

Here's what I get:

$ gdalwarp test.tif testutm4n.tif
ERROR 1: Failed to compute polynomial equations of desired order
for provided control points.

Am I doing something wrong?  And yes, I'm after sub-centimeter pixels in 
my image. Setting the -tr flag to define the output pixel resolution 
doesn't make a difference.

$ listgeo test.tif
    Version: 1
    Key_Revision: 1.0
       ModelTiepointTag (4,3):
          722              -14314           0
          68470.329        6115827.93       0
          8059.47          -1095.2          0
          68458.758        6115826.18       0
       GTModelTypeGeoKey (Short,1): ModelTypeProjected
       GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
       GTCitationGeoKey (Ascii,21): "WGS 84 / UTM zone 4N"
       GeogCitationGeoKey (Ascii,7): "WGS 84"
       GeogAngularUnitsGeoKey (Short,1): Angular_Degree
       ProjectedCSTypeGeoKey (Short,1): PCS_WGS84_UTM_zone_4N
       ProjLinearUnitsGeoKey (Short,1): Linear_Meter

PCS = 32604 (WGS 84 / UTM zone 4N)
Projection = 16004 (UTM zone 4N)
Projection Method: CT_TransverseMercator
    ProjNatOriginLatGeoKey: 0.000000 (  0d 0' 0.00"N)
    ProjNatOriginLongGeoKey: -159.000000 (159d 0' 0.00"W)
    ProjScaleAtNatOriginGeoKey: 0.999600
    ProjFalseEastingGeoKey: 500000.000000 m
    ProjFalseNorthingGeoKey: 0.000000 m
GCS: 4326/WGS 84
Datum: 6326/World Geodetic System 1984
Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
Prime Meridian: 8901/Greenwich (0.000000/  0d 0' 0.00"E)
Projection Linear Units: 9001/metre (1.000000m)

Corner Coordinates:
  ... unable to transform points between pixel/line and PCS space

More information about the FWTools mailing list