I have got a raster image (tif) from a mapping site and an associated .TAB file. I am trying to correctly map it into CAD/3d model - which I know is set up to the correct coordinates.

The .TAB file is as follows:

!version 300
!charset WindowsLatin1

Definition Table
  File "Getmapping_Index_Map.tif"
  Type "RASTER"
  (336451.73,971812.515) (0,591) Label "Pt 1",
  (336451.73,974812.515) (0,0) Label "Pt 2",
  (339451.73,974812.515) (591,0) Label "Pt 3",
  (339451.73,971812.515) (591,591) Label "Pt 4"
  CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 400000, -100000
  Units "m"
  RasterStyle 4 1
  RasterStyle 7 16777215

I assumed that the coordinates of the corners of the image were (336451.73,974812.515) and (339451.73,974812.515) but while that gets it centred on the right point it is not the right scale. I can't work out what the (0,0)(591,591) coordinates are for. It seems to be coming out about 3 times the correct size.

(I can't see a similar question, although that may be due to not knowing the correct terminology. If so my apologies.)

  • are you using AutoCAD Map?
    – vinayan
    Apr 6 '12 at 13:28
  • @vinayan - no just plain autocad (and blender to deal with the 3d). Nothing that can read the tab file, but I'm sure it should be simple to calculate the coordinates manually.
    – neil
    Apr 6 '12 at 13:30
  • one quickfire way would be to open the tiff in Quantum GIS..from there you can get the coordinates on screen..
    – vinayan
    Apr 6 '12 at 13:35
  • @vinayan I'll try that. Although it seems to be a pretty huge download.
    – neil
    Apr 6 '12 at 14:06
  • just download FWTools..its only 22 MB in size..
    – vinayan
    Apr 6 '12 at 14:07

You can use GDAL for this task..This is a command line utility.. A good way to install it would be by downloading the FWTools FWTools

In the FWTools Shell,just run the below command..

gdalinfo yourtiffname.tiff

you will get all corner and center coordinates on screen like this

enter image description here

  • Thanks this worked. I actually ended up installing the whole Quantum GIS but this was faster and easier. I don't quite understand how you get from the data in the file to the data this provides, but it works so thats what matters.
    – neil
    Apr 6 '12 at 15:14
  • @neil - Now that you have installed Qgis, you won't regret the decistion..it contains GUIs for most of the gdal tools(if you enable the gdal plugin) :-)
    – vinayan
    Apr 6 '12 at 15:25

I've found that TIFF solution doesn't work for OS StreetView data, as they only have meaningful coordinates in TAB/TFW files.

CoordSys Earth Projection 8, 79… means coordinates are OSGB36 (Ordnance Survey Easting/Northing).

OSGB36 coordinates are written either with a two-letter prefix (Grid References) or without. That file uses version without prefix.

The lines with Label define where four corners of the image are.

Take first two numbers from a line with Label:

(336451.73,971812.515) (0,591) Label "Pt 1",

and feed them to a conversion library like this one:

osgb=new GT_OSGB();

//convert to a wgs84 coordinate
wgs84 = osgb.getWGS84();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.