[GRASS-user] OT: transform mapinfo tab file with coordsys to world file

Richard Greenwood richard.greenwood at gmail.com
Fri Oct 26 11:51:13 EDT 2007


On 10/26/07, Moritz Lennert <mlennert at club.worldonline.be> wrote:
> Hello,
>
> This question is a bit off-topic, but related to what we need to do with
> GRASS:
>
> We have a series of georeferenced .tif files accompanied by .tab files
> which look like this:
>
> Definition Table
>    File "s5_15 nw3_b-iii.tif"
>    Type "RASTER"
>    (513881,9523020) (1008,1098) Label "Pt 1",
>    (519881,9523020) (10493,1111) Label "Pt 2",
>    (519881,9517020) (10451,10523) Label "Pt 3",
>    (513881,9517020) (990,10509) Label "Pt 4"
>    CoordSys Earth Projection 8, 104, "m", 15, 0, 0.9996, 500000, 10000000
>    Units "m"
>
>
> However, gdal does not support the Mapinfo's CoordSys:
> "only control points used, Coordsys ignored"
> (http://www.gdal.org/frmt_gtiff.html).
>
> I guess that if we could transform these files into ESRI world files
> (http://www.gdal.org/frmt_various.html#WLD), we could import them easily
> with GDAL. But how to do this, as ESRI world files give transformation
> parameters, not points and projection info ?
>
> Or is this the wrong approach ?
>
> We can obviously easily import each file into an XY location and then
> run i.rectify on the basis of the available points, but I was wondering
> whether there is a better way.
>
> Moritz

If you have access to MapInfo and/or ArcView, there are some scripts
floating around that will convert TAB registered images to TFW
registered. One that I found was:
  http://spatialnews.geocomm.com/community/lists/viewmessage.phtml?id=35852

If not, you could write a script that would generate a TFW from the
TAB. The TFW requires that the coordinates of the upper left pixel be
specified, and the size of each pixel be specified. The TAB is a
little different as is specifies three or more pixel/coordinate pairs,
but you could work backwards for the pixel/coordinate pairs to
calculate the upper left pixel and pixel size. The TAB also specifies
the coordinate system, which would have to be converted into a
separate .PRJ file.

Regards,

-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com




More information about the grass-user mailing list