A TIFF or other image can be mostly easily georeferenced (registered) to to a coordinate system using the TatukGIS Editor. Open the subject TIFF (*.TIF) file and apply three GCP points to rotate and scale the image to a known coordinate system and then save the image which will generate, to the same file folder, an associated TFW (*.TFW) file (a plain text file commonly known as a world file) containing the coordinate system information. Refer to the Editor rectification features for more information.
Wtih the DK product there are two options.
Option 1: Create a TFW file (world file). If the *.TFW file is named exactly the same as the associated *.TIF file and saved to the same file folder as the *.TIF file, the *.TFW file will be used automatically.
A sample *.TIF and sample *.TFW:
6.00
0.00
0.00
-6.00
1709053.00
807714.00
Line 1 - Cell size in the "X" direction
Line 2 - always 0
Line 3 - always 0
Line 4 - Cell size in the "Y" direction (always negative)
Line 5 - Easting value of insertion point "X"
Line 6 - Northing value of insertion point "Y"
World files can also be used for other types of pixel layers, with naming as follows:
.TIF -> .TFW
.BMP -> .BPW
.JPG -> .JFW
.BIL - > .BLW
Option 2: The programmatic way:
ll := TGIS_LayerTIF.Create
ll.Path := 'sample.tif'
GIS_ViewerWnd1.Add( ll ) ;
ll.Extent := desired extent ;
Call GIS.ExportToImage to save to a georeferenced image.
It is important to set up an extent after adding the layer to the viewer. During Add procedure the program tries to calculate the extent based on GeoTIFF tags or the world file.
Note the above DK registration procedure adjusts only the scale of the raster image, without applying rotation or any rectification.