Combining world files, tab files and tiffs

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Combining world files, tab files and tiffs

Craig Stanton
Hi All,
        I'm trying to make geotiffs out of the tiffs available from the British Ordanance Survey (https://www.ordnancesurvey.co.uk/opendatadownload/products.html). They come with both .tfw and .tab files and I understand how to use listgeocp to insert the world files into the tif but without projection information they're still next to useless within the app I'm using. I've searched around and found this question was once asked on this very list, but the answer doesn't help me

http://lists.maptools.org/pipermail/geotiff/2007-December/000430.html

I've now got GDAL and don't know what to do with it. I'm on OS X so if there is another (free) tool I can use that would be OK with me, just so long as I end up with a fully valid geotiff.


Cheers,
        Craig
_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: Combining world files, tab files and tiffs

David Burken
  Hi Craig,

On 08/26/2010 07:24 PM, Craig Stanton wrote:
> Hi All,
> I'm trying to make geotiffs out of the tiffs available from the British Ordanance Survey (https://www.ordnancesurvey.co.uk/opendatadownload/products.html). They come with both .tfw and .tab files and I understand how to use listgeocp to insert the world files into the tif but without projection information they're still next to useless within the app I'm using. I've searched around and found this question was once asked on this very list, but the answer doesn't help me
>
> http://lists.maptools.org/pipermail/geotiff/2007-December/000430.html
>
> I've now got GDAL and don't know what to do with it. I'm on OS X so if there is another (free) tool I can use that would be OK with me, just so long as I end up with a fully valid geotiff.
I'm sure that gdal can do this, you probably should ping their mailing
list.  Do you know the underlying projection for the matching tfw
files?  If so, the ossim library has an application "ossim-tfw2ogeom"
that takes a template file that has the projection in it and the tfw an
makes an ossim geometry file.  Once you have that you would use
"ossim-icp" to copy your.tif -> geo.tif.  Not the ideal solution but it
works.  The key is you need to know what projection the tfw is relative
to and make the template.

Hope that helps,
Dave

>
> Cheers,
> Craig
> _______________________________________________
> Geotiff mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/geotiff
>
_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: Combining world files, tab files and tiffs

peifer
In reply to this post by Craig Stanton
On 27/08/2010 01:24, Craig Stanton wrote:
> Hi All,
>  I'm trying to make geotiffs out of the tiffs available from the British Ordanance Survey...
>  I've now got GDAL and don't know what to do with it.

You could use the gdal tools like this:

$ ls -1  MiniScale_\(with_grid\)_R12.*
MiniScale_(with_grid)_R12.tfw
MiniScale_(with_grid)_R12.tif


$ gdalinfo "MiniScale_(with_grid)_R12.tif"
Warning 1: TIFFFetchNormalTag:Incompatible type for "RichTIFFIPTC"; tag
ignored
Driver: GTiff/GeoTIFF
Files: MiniScale_(with_grid)_R12.tif
        MiniScale_(with_grid)_R12.tfw
Size is 7000, 13000
Coordinate System is `'
Origin = (0.000000000000000,1300000.000000000000000)
Pixel Size = (100.000000000000000,-100.000000000000000)
Metadata:
   TIFFTAG_SOFTWARE=Adobe Photoshop CS4 Macintosh
   TIFFTAG_DATETIME=2009:12:04 12:52:21
   TIFFTAG_XRESOLUTION=254
   TIFFTAG_YRESOLUTION=254
   TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
   COMPRESSION=LZW
   INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (       0.000, 1300000.000)
Lower Left  (   0.0000000,   0.0000000)
Upper Right (  700000.000, 1300000.000)
Lower Right (  700000.000,       0.000)
Center      (  350000.000,  650000.000)
Band 1 Block=7000x12 Type=Byte, ColorInterp=Red
Band 2 Block=7000x12 Type=Byte, ColorInterp=Green
Band 3 Block=7000x12 Type=Byte, ColorInterp=Blue


$ gdal_translate "MiniScale_(with_grid)_R12.tif" out.tif -a_srs
epsg:27700 -co compress=lzw
Warning 1: TIFFFetchNormalTag:Incompatible type for "RichTIFFIPTC"; tag
ignored
Input file size is 7000, 13000
0...10...20...30...40...50...60...70...80...90...100 - done.


$ gdalinfo out.tif
Driver: GTiff/GeoTIFF
Files: out.tif
Size is 7000, 13000
Coordinate System is:
PROJCS["OSGB 1936 / British National Grid",
     GEOGCS["OSGB 1936",
         DATUM["OSGB_1936",
             SPHEROID["Airy 1830",6377563.396,299.3249646000044,
                 AUTHORITY["EPSG","7001"]],
             AUTHORITY["EPSG","6277"]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433],
         AUTHORITY["EPSG","4277"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",49],
     PARAMETER["central_meridian",-2],
     PARAMETER["scale_factor",0.9996012717],
     PARAMETER["false_easting",400000],
     PARAMETER["false_northing",-100000],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AUTHORITY["EPSG","27700"]]
Origin = (0.000000000000000,1300000.000000000000000)
Pixel Size = (100.000000000000000,-100.000000000000000)
Metadata:
   TIFFTAG_SOFTWARE=Adobe Photoshop CS4 Macintosh
   TIFFTAG_DATETIME=2009:12:04 12:52:21
   TIFFTAG_XRESOLUTION=254
   TIFFTAG_YRESOLUTION=254
   TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
   AREA_OR_POINT=Area
Image Structure Metadata:
   COMPRESSION=LZW
   INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (       0.000, 1300000.000) (  9d29'46.99"W, 61d22'30.11"N)
Lower Left  (   0.0000000,   0.0000000) (  7d33'23.21"W, 49d45'58.27"N)
Upper Right (  700000.000, 1300000.000) (  3d38'5.08"E, 61d27'54.68"N)
Lower Right (  700000.000,       0.000) (  2d10'18.73"E, 49d49'27.99"N)
Center      (  350000.000,  650000.000) (  2d47'47.26"W, 55d44'26.94"N)
Band 1 Block=7000x1 Type=Byte, ColorInterp=Red
Band 2 Block=7000x1 Type=Byte, ColorInterp=Green
Band 3 Block=7000x1 Type=Byte, ColorInterp=Blue

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: Combining world files, tab files and tiffs

Craig Stanton
In reply to this post by David Burken
Thanks Dave and Hermann,
        I'm not sure of the projection used in the maps I've got. I looked on the website and either missed something obvious or the makers have just assumed everyone knows. I'll look further and try out what you suggested.

Cheers,
        Craig

On 27/08/2010, at 10:34 PM, David Burken wrote:

> Hi Craig,
>
> On 08/26/2010 07:24 PM, Craig Stanton wrote:
>> Hi All,
>> I'm trying to make geotiffs out of the tiffs available from the British Ordanance Survey (https://www.ordnancesurvey.co.uk/opendatadownload/products.html). They come with both .tfw and .tab files and I understand how to use listgeocp to insert the world files into the tif but without projection information they're still next to useless within the app I'm using. I've searched around and found this question was once asked on this very list, but the answer doesn't help me
>>
>> http://lists.maptools.org/pipermail/geotiff/2007-December/000430.html
>>
>> I've now got GDAL and don't know what to do with it. I'm on OS X so if there is another (free) tool I can use that would be OK with me, just so long as I end up with a fully valid geotiff.
> I'm sure that gdal can do this, you probably should ping their mailing list.  Do you know the underlying projection for the matching tfw files?  If so, the ossim library has an application "ossim-tfw2ogeom" that takes a template file that has the projection in it and the tfw an makes an ossim geometry file.  Once you have that you would use "ossim-icp" to copy your.tif -> geo.tif.  Not the ideal solution but it works.  The key is you need to know what projection the tfw is relative to and make the template.
>
> Hope that helps,
> Dave
>
>>
>> Cheers,
>> Craig
>> _______________________________________________
>> Geotiff mailing list
>> [hidden email]
>> http://lists.maptools.org/mailman/listinfo/geotiff
>>

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: Combining world files, tab files and tiffs

Craig Stanton
In reply to this post by peifer
Ah, I see you actually list the projection in your examples below. Missed that the first time but I understand it now. The maps do appear to have been tagged with the projection stuff, now I just need to get find out if they are missing the pixel size/scale information, or if my app is ignoring it.

Thanks,
        Craig


On 27/08/2010, at 10:44 PM, Hermann Peifer wrote:

> On 27/08/2010 01:24, Craig Stanton wrote:
>> Hi All,
>> I'm trying to make geotiffs out of the tiffs available from the British Ordanance Survey...
>> I've now got GDAL and don't know what to do with it.
>
> You could use the gdal tools like this:
>
> $ ls -1  MiniScale_\(with_grid\)_R12.*
> MiniScale_(with_grid)_R12.tfw
> MiniScale_(with_grid)_R12.tif
>
>
> $ gdalinfo "MiniScale_(with_grid)_R12.tif"
> Warning 1: TIFFFetchNormalTag:Incompatible type for "RichTIFFIPTC"; tag
> ignored
> Driver: GTiff/GeoTIFF
> Files: MiniScale_(with_grid)_R12.tif
>        MiniScale_(with_grid)_R12.tfw
> Size is 7000, 13000
> Coordinate System is `'
> Origin = (0.000000000000000,1300000.000000000000000)
> Pixel Size = (100.000000000000000,-100.000000000000000)
> Metadata:
>   TIFFTAG_SOFTWARE=Adobe Photoshop CS4 Macintosh
>   TIFFTAG_DATETIME=2009:12:04 12:52:21
>   TIFFTAG_XRESOLUTION=254
>   TIFFTAG_YRESOLUTION=254
>   TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
> Image Structure Metadata:
>   COMPRESSION=LZW
>   INTERLEAVE=PIXEL
> Corner Coordinates:
> Upper Left  (       0.000, 1300000.000)
> Lower Left  (   0.0000000,   0.0000000)
> Upper Right (  700000.000, 1300000.000)
> Lower Right (  700000.000,       0.000)
> Center      (  350000.000,  650000.000)
> Band 1 Block=7000x12 Type=Byte, ColorInterp=Red
> Band 2 Block=7000x12 Type=Byte, ColorInterp=Green
> Band 3 Block=7000x12 Type=Byte, ColorInterp=Blue
>
>
> $ gdal_translate "MiniScale_(with_grid)_R12.tif" out.tif -a_srs
> epsg:27700 -co compress=lzw
> Warning 1: TIFFFetchNormalTag:Incompatible type for "RichTIFFIPTC"; tag
> ignored
> Input file size is 7000, 13000
> 0...10...20...30...40...50...60...70...80...90...100 - done.
>
>
> $ gdalinfo out.tif
> Driver: GTiff/GeoTIFF
> Files: out.tif
> Size is 7000, 13000
> Coordinate System is:
> PROJCS["OSGB 1936 / British National Grid",
>     GEOGCS["OSGB 1936",
>         DATUM["OSGB_1936",
>             SPHEROID["Airy 1830",6377563.396,299.3249646000044,
>                 AUTHORITY["EPSG","7001"]],
>             AUTHORITY["EPSG","6277"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4277"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",49],
>     PARAMETER["central_meridian",-2],
>     PARAMETER["scale_factor",0.9996012717],
>     PARAMETER["false_easting",400000],
>     PARAMETER["false_northing",-100000],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AUTHORITY["EPSG","27700"]]
> Origin = (0.000000000000000,1300000.000000000000000)
> Pixel Size = (100.000000000000000,-100.000000000000000)
> Metadata:
>   TIFFTAG_SOFTWARE=Adobe Photoshop CS4 Macintosh
>   TIFFTAG_DATETIME=2009:12:04 12:52:21
>   TIFFTAG_XRESOLUTION=254
>   TIFFTAG_YRESOLUTION=254
>   TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
>   AREA_OR_POINT=Area
> Image Structure Metadata:
>   COMPRESSION=LZW
>   INTERLEAVE=PIXEL
> Corner Coordinates:
> Upper Left  (       0.000, 1300000.000) (  9d29'46.99"W, 61d22'30.11"N)
> Lower Left  (   0.0000000,   0.0000000) (  7d33'23.21"W, 49d45'58.27"N)
> Upper Right (  700000.000, 1300000.000) (  3d38'5.08"E, 61d27'54.68"N)
> Lower Right (  700000.000,       0.000) (  2d10'18.73"E, 49d49'27.99"N)
> Center      (  350000.000,  650000.000) (  2d47'47.26"W, 55d44'26.94"N)
> Band 1 Block=7000x1 Type=Byte, ColorInterp=Red
> Band 2 Block=7000x1 Type=Byte, ColorInterp=Green
> Band 3 Block=7000x1 Type=Byte, ColorInterp=Blue
>
> _______________________________________________
> Geotiff mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/geotiff

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff