0

I try to convert several tiff to vrt -file. All tif-files are in same projection (EPSG:3067). I get error message: Gdalbuildvrt does not support rotated geo transforms. What this mean and how to avoid this error? I suppose there isnt any rotation in those tif-files.

Tiffinfo gives next information about example file:

Z:\A_tuotteet\Osoitekartta_40k\ETRS_TM35FIN>tiffinfo Kuvaruutu\Tiff_KESA\K241.tif

TIFFReadDirectory: Warning, Unknown field with tag 33550 (0x830e) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 33922 (0x8482) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34735 (0x87af) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34736 (0x87b0) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 34737 (0x87b1) encountered.
TIFF Directory at offset 0xbcafa (772858)
  Image Width: 12000 Image Length: 6000
  Resolution: 254, 254 pixels/inch
  Bits/Sample: 8
  Compression Scheme: LZW
  Photometric Interpretation: palette color (RGB from colormap)
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 2
  Planar Configuration: single image plane
  Page Number: 0-1
  Color Map: (present)
  White Point: 0.3127-0.329
  PrimaryChromaticities: 0.640000,0.330000,0.300000,0.600000,0.150000,0.060000
  Tag 33550: 4.000000,4.000000,0.000000
  Tag 33922: 0.000000,0.000000,0.000000,20000.000000,6642000.000000,0.000000
  Tag 34735: 1,1,0,8,1024,0,1,1,1025,0,1,1,1026,34737,22,0,2049,34737,7,22,2054,0,1,9102,2062,34736,3,0,3072,0,1,3067,3076,0,1,9001
  Tag 34736: 0.000000,0.000000,0.000000
  Tag 34737: ETRS89 / TM35FIN(E,N)|ETRS89|

Same information using gdalinfo

Driver: GTiff/GeoTIFF
Files: Kuvaruutu\Tiff_KESA\K241.tif
Size is 12000, 6000
Coordinate System is:
PROJCS["ETRS89 / TM35FIN(E,N)",
    GEOGCS["ETRS89",
        DATUM["European_Terrestrial_Reference_System_1989",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6258"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4258"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",27],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","3067"]]
Origin = (20000.000000000000000,6642000.000000000931323)
Pixel Size = (4.000000000000002,-4.000000000000001)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_XRESOLUTION=254
  TIFFTAG_YRESOLUTION=254
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (   20000.000, 6642000.000) ( 18d28'18.40"E, 59d38'16.57"N)
Lower Left  (   20000.000, 6618000.000) ( 18d31'33.02"E, 59d25'29.24"N)
Upper Right (   68000.000, 6642000.000) ( 19d18'54.73"E, 59d41'25.43"N)
Lower Right (   68000.000, 6618000.000) ( 19d21'50.59"E, 59d28'36.50"N)
Center      (   44000.000, 6630000.000) ( 18d55' 8.15"E, 59d33'29.37"N)
Band 1 Block=12000x2 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
  • What does gdalinfo show for you? – user30184 Sep 19 '19 at 11:23
  • thanks, I added more details in main text – Mickeler Sep 19 '19 at 11:41
  • That image is not rotated but perhaps you have some images which are georeferenced with ground control points or with a .tfw with rotation in the bunch. Try buildvrt with two images first and see if it succeeds then. Adding --debug on may print some more information about the failure. – user30184 Sep 19 '19 at 12:12
  • gdalbuildvrt Z:\A_tuotteet\vrt\testi.vrt -srcnodata "0 0 0" -vrtnodata "0 0 0" --debug Kuvaruutu\Tiff_KESA\K24*.tif 0...10...20...30...40...50...60..Warning 6: gdalbuildvrt does not support rotated geo transforms. Skipping Kuvaruutu\Tiff_KESA\K243.tif .70...80...90...100 - done. Warning 6: gdalbuildvrt does not support rotated geo transforms. Skipping Kuvaruutu\Tiff_KESA\K244.tif – Mickeler Sep 19 '19 at 12:25
  • What is your GDAL version gdalinfo --version? Are "osoitekartta" maps open data so you could give a link for downloading some test data? – user30184 Sep 19 '19 at 13:32
1

I had a try with GDAL 2.4.0, released 2018/12/14 from OSGeo4W and then after update to GDAL 2.4.1, released 2019/03/15. I had no problem at all with your test data.

Result:

gdalbuildvrt test.vrt *.tif
0...10...20...30...40...50...60...70...80...90...100 - done.

gdalinfo test.vrt|more
Driver: VRT/Virtual Raster
Files: test.vrt
       L333.tif
       L334.tif
Size is 12000, 12000
Coordinate System is:
PROJCS["ETRS89 / TM35FIN(E,N)",
    GEOGCS["ETRS89",
        DATUM["European_Terrestrial_Reference_System_1989",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6258"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4258"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",27],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","3067"]]
Origin = (260000.000000000029104,6714000.000000000931323)
Pixel Size = (4.000000000000002,-4.000000000000001)
Corner Coordinates:
Upper Left  (  260000.000, 6714000.000) ( 22d37'48.79"E, 60d29'25.49"N)
Lower Left  (  260000.000, 6666000.000) ( 22d41'14.15"E, 60d 3'38.39"N)
Upper Right (  308000.000, 6714000.000) ( 23d30' 7.31"E, 60d30'58.14"N)
Lower Right (  308000.000, 6666000.000) ( 23d32'51.92"E, 60d 5' 9.44"N)
Center      (  284000.000, 6690000.000) ( 23d 5'30.54"E, 60d17'20.43"N)
Band 1 Block=128x128 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
    0: 0,0,0,255
    1: 52,52,48,255
    2: 64,48,24,255
...
| improve this answer | |
  • Thanks and sorry about wrong tiles. I see not every tile gives error message but some does. There is now another files where tile M431 should be correct and M432 gives error. Would you please check these files also? we.tl/t-dltNF9ftKs – Mickeler Sep 24 '19 at 13:14
  • If you run gdalinfo for M432.tif you will see very small rotation in the GeoTransform element GeoTransform = 404000, 4.000000000000002, 0 6810000, 1.262072258133738e-29, -4.000000000000001. The corresponding .tfw file does not include rotation. I must think a while for a nice solution for bypassing the very small rotation factor that is stored into the geotiff tags. – user30184 Sep 24 '19 at 13:27
  • If none of the .tfw files contain the rotation elements (the second and third line are zeroes) you can bypass the internal geotiff tags by setting an environment variable set GDAL_GEOREF_SOURCES=WORLDFILE in the command window before running any GDAL commands. Or use the GEOREF_SOURCES open option gdal.org/drivers/raster/gtiff.html. If you bypass geotiff georeferencing you must set the srs for gdalbuildvrt manually with -a_srs epsg:3067. But if any of the .tfw files include rotation you will see a failure as well. – user30184 Sep 24 '19 at 13:54
1

In the rare case when internal GeoTIFF tags claim that GeoTIFF is rotated but .twf file does not contain the rotation elements you can set worldfile to be the source for finding the georeferencing into.

gdalbuildvrt test.vrt m*.tif
0...10...20...30...40...50...60...70...80...90...100 - done.
Warning 6: gdalbuildvrt does not support rotated geo transforms. Skipping M432.tif

set GDAL_GEOREF_SOURCES=WORLDFILE

gdalbuildvrt test.vrt m*.tif
0...10...20...30...40...50...60...70...80...90...100 - done.

This is absolutely not a generally usable solution but it may work with your data. Please discuss with the creators of the files and ask them to check their process. Rotational element like 1.262072258133738e-29 is meaningless and the final product should not contain such tags.

| improve this answer | |

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.