[GRASS-user] gdal_warp

Maciej Sieczka tutey at o2.pl
Wed Jul 11 17:05:19 EDT 2007


goldneaa at onid.orst.edu wrote:
> I have unprojected Geotiff data that I am trying to put a projection
> using gdalwarp.  My input is
> 
> gdalwarp -s_srs epsg:26910 -tps -t_srs epsg:2766 ts_1870.tif proj_1870.tif
> When I try to convert I get the error.
>
> ERROR 1: Unable to compute a transformation between pixel/line
> and georeferenced coordinates for ts_1870.tif.
> There is no affine transformation and no GCPs.

This means that your input raster is not georectified; or lost it's
georefence at best; the georeference in case of TIFF file can be either
stored in GeoTIFF tags [1],[2] or in a worldfile [3].

You would need to georectify the raster first. In GRASS you can do it
with i.group+i.target+i.rectify or the georeferencer GUI in gis.m.
There is also a plugin in QGIS for such tasks. And many more other tools.

If the raster is already georectified but just lost it's georeference,
2 GCPs should be enough to georefence it back (just move it in space
and set scale). But if it's eg. a raw map scan, more, evenly spaced
GCPs are needed. If it's an aerial photo or a raw satelite imagery
orthorectification is necessary, which involves the information about
the camera or scanner parameters besides the GCPs alone. In GRASS you
can orthorectify aerial photos with i.ortho.photo. GRASS does not
support orthorectification of satellite imagery yet. There is a
partially developed tool by Markus Neteler, but it needs a volunteer to
finish it. See the recent list's archives for details.

> I am trying to plug in more flags from the gdalwarp help page, to
> understand GCPs,

Search for "ground control points" on the net. Georectifying is all
about setting GCPs and moving, stretching and rotating the image
according to them. You can achieve that with gdal_translate (set GCPs)
+ gdalwarp (rectify the image using the GCPs set), but propably this is
not the most optimal way of doing this, unless you have a set of GCPs
for your image already at hand.

> but I have had no luck.

[1]http://www.remotesensing.org/geotiff/geotiff.html
[2]http://www.gdal.org/frmt_gtiff.html
[3]http://www.gdal.org/frmt_various.html#WLD

Maciek




More information about the grass-user mailing list