[Geotiff] georectifying an image

Frank Warmerdam warmerdam at pobox.com
Tue Oct 19 06:16:16 PDT 2010


Pete Flugstad wrote:
> I would like to georectify a group of images I have (bmps).  I have
> the lat/lon for each corner
> of the images.  I have tried to use gdal_translate to do this and it
> seems to work, however
> the viewing utility I'm using (OpenMap), wants tiepoints in the
> resulting geotiff to load it
> properly.  Are tie points the same thing as GCPs?  It looks like I can
> attach those by
> adding gcp's to the image, possibly using gdal_translate  Is there a
> better way to do that?
> Do I need to use gdal_warp when I'm done?

Pete,

Yes, in order to produce a conventional "north up" rectified image you
should run gdalwarp on the image after attaching gcps.

eg.

   gdal_translate -gcp ... in.tif image_with_gcps.tif
   gdalwarp image_with_gcps.tif rectified_image.tif

You might want to consider a non-default resampling type for gdalwarp,
like bilinear - just add "-r bilinear"

   gdalwarp -r bilinear image_with_gcps.tif rectified_image.tif

> One problem I'm seeing is that the -gcp flag to gdal_translate wants
> northing/easting values,
> but I have the corner lat/long's.  Is there a way to translate
> lat/long to n/e values?

You can use lat and long, but keep in mind that the easting is the longitude
and the northing is the latitude.

Also, if you have lat/long values you can assign a coordinate system.

eg.

  gdal_translate -a_srs WGS84 -gcp .. -gcp .. in.tif out.tif

There are also mechanisms avalable to transform lat/long values to
projected coordinates if needed, but they are a bit involved and you
may not need them.

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 Geotiff mailing list