It's ok with map because it opened perfectly in Mapinfo application. What is the problem and how to fix it? I need georeferenced raster in qgis.
A Mapinfo TAB file for a raster looks like this:
!table !version 300 !charset WindowsLatin1 Definition Table File "4430.tif" Type "RASTER" (647250.000,234000.000) (0,0) Label "Pt 1", (648000.000,233500.000) (3000,2000) Label "Pt 2", (648000.000,234000.000) (3000,0) Label "Pt 3", (647250.000,233500.000) (0,2000) Label "Pt 4" CoordSys NonEarth Units "m" Units "m" RasterStyle 1 50 RasterStyle 2 50
1st solution: create a gcp file (a simple text file) for QGIS Georeferencer plugin like this (for the TAB above):
mapX,mapY,pixelX,pixelY,enable 647250.000,234000.000,0,0,1 648000.000,233500.000,3000,2000,1 648000.000,234000.000,3000,0,1 647250.000,233500.000,0,2000,1
Open the Georeferencer plugin in QGIS, load the GCP file (search for the icon) and do the transformation.
2nd solution, generate world (pnw, pgw, tfw, etc.) file from the tab. You can easily calculate the six parameters of an affine transformation from the values in the TAB file. AFAIK Mapinfo handles rectified images (rows are parallel to the axis of the coordinate system). For the previous TAB file (tif image) the following twf file should be used:
0.25 0.00 0.00 0.25 647250.125 233999.875
First row is the resolution of the raster in x (east) direction:
(648000 - 647250) / 3000 e.g. (xmax - xmin) / pixel_width
The second and third row shear, always 0 for rectified images.
fourth row is the negativ resolution of the raster in y (north) direction:
(234000.000 - 233500.000) / 2000 e.g. (ymin - ymax) / pixel_height
The fifth row is the x coordinate of center of the upper left pixel (x_resolution is in the first row of tfw file):
647250.000 + 0.25 / 2 e.g. xmin + x_resolution / 2
The sixth row is the y coordinate of center of the upper left pixel(y_resolution is in the fourth row of tfw file) :
234000.000 - 0.25 / 2 e.g. ymax + y_resolution / 2
Copy the raster (in our sample 4430.tif) and the world file (in our case (4430.tfw) into the same folder and open it in QGIS as a raster.
These processes preserves the projection of the original raster. In the second case (which I would prefer) the name of the two files (tif and tfw) must be the same.
The answer is to use .jpeg-.tab georeferenced pairs and then convert them to the tif files that will be georeferenced too because info in tab is converting and storing in tif automatically. The convertation is easy in QGIS (gdalwarp command): Raster->Projections->Warp(Reproject). Input file - .jpeg, output - .tif. Also we can reproject in batch mode to proccess whole directory with .jpeg-.tab pairs. Have a nice day!