I have an image that has been georeferenced (geotiff.lib) by more than 3 tie points (x y 0 long lat 0 ...) and added following geotiff keys
GTIFKeySet(gtif, GTModelTypeGeoKey, TYPE_SHORT, 1, ModelTypeGeographic); GTIFKeySet(gtif, GTRasterTypeGeoKey, TYPE_SHORT, 1, RasterPixelIsArea); GTIFKeySet(gtif, GTCitationGeoKey, TYPE_ASCII, 9, "GEODETIC"); GTIFKeySet(gtif, GeographicTypeGeoKey, TYPE_SHORT, 1, GCS_WGS_84); GTIFKeySet(gtif, GeogCitationGeoKey, TYPE_ASCII, 7, "WGS 84"); GTIFKeySet(gtif, GeogAngularUnitsGeoKey, TYPE_SHORT, 1, Angular_Degree);
without using the TIFFTAG_GEOPIXELSCALE tag entry.
If I open it in Quantum GIS the scale is wrong and it does not get georeferenced. There is no difference if I take the corner points of the image as tie points or randomized points of interest.
If I open the same image in e.g. GlobalMapper the image gets the correct position and the scale is correct.
As per advice from GeoTiff Specification it should hopefully be a correct GeoTiff:
Case 1: The model-location of a raster point (x,y) is known, but not the scale or orientations: Use the ModelTiepointTag to define the (X,Y,Z) coordinates of the known raster point. Case 2: The location of three non-collinear raster points are known exactly, but the linearity of the transformation is not known. Use the ModelTiepointTag to define the (X,Y,Z) coordinates of all three known raster points. Do not compute or define the ModelPixelScale or ModelTransformation tag.
Is there any missing entry for QGis? How would you suggest to georeference images by using geotiff.lib without knowing the transformation parameters?
Thanks for helping!