I have some scanned tiff images. I want to georeference them. I
calculate the tie points and pixel scales, but I could not succeeded
in writing them as tiff tags. Therefore, GTIFImageToPCS always fails
when I try to read the georeference information. I am using
libgeotiff. Is there a sample code to achieve this, which tags and
keys do I have to set ?
Hi,
If programming by yourself is not needed, you could perhaps use gdal programs, see http://www.gdal.org/
If you have at least three tie points for an image, you can use gdal_translate to input tie points and gdalwarp to warp the image:
gdal_translate -gcp pixel line easting northing -gcp ... scanned.tif tmp.tif
gdalwarp tmp.tif result.tif
gdal_translate can also be used to convert tif/tfw to geotiff, if that
is enough for you.
I have some scanned tiff images. I want to georeference them. I
calculate the tie points and pixel scales, but I could not succeeded
in writing them as tiff tags. Therefore, GTIFImageToPCS always fails
when I try to read the georeference information. I am using
libgeotiff. Is there a sample code to achieve this, which tags and
keys do I have to set ?
Hi,
If programming by yourself is not needed, you could perhaps use gdal programs, see http://www.gdal.org/
If you have at least three tie points for an image, you can use gdal_translate to input tie points and gdalwarp to warp the image:
gdal_translate -gcp pixel line easting northing -gcp ... scanned.tif
tmp.tif
gdalwarp tmp.tif result.tif
gdal_translate can also be used to convert tif/tfw to geotiff, if that
is enough for you.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 292 |
Nodes: | 16 (2 / 14) |
Uptime: | 206:06:08 |
Calls: | 6,618 |
Calls today: | 2 |
Files: | 12,168 |
Messages: | 5,316,751 |