0

I have for some days now tried to create a image pyramid from a set of around 1400 TIFF files with no luck. I can't get my head around what is the cause of the problem.

I will try to explain as good as I can what I have done so far..

The images where from the begining djvu images. Then I converted them into TIFF files and with gdal_translate I applied gcp points to the corners of the maps. After that I used gdalwarp and the resulting TIFF files are at least correct in that way that I display them correctly one by one and they match on underlying maps (I have not checked all images but taken som random samples).

Output from gdalinfo from one of the single TIFF files:

    Size is 6073, 4631
Coordinate System is:
PROJCS["SWEREF99 TM",
    GEOGCS["SWEREF99",
        DATUM["SWEREF99",
            SPHEROID["GRS 1980",6378137,298.2572221010002,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6619"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4619"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",15],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","3006"]]
Origin = (625350.199250000060000,6519964.666499999400000)
Pixel Size = (2.002208743452976,-2.002208743452976)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=254
  TIFFTAG_YRESOLUTION=254
Image Structure Metadata:
  COMPRESSION=YCbCr JPEG
  INTERLEAVE=PIXEL
  SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left  (  625350.199, 6519964.666) ( 17d10'10.46"E, 58d48' 4.91"N)
Lower Left  (  625350.199, 6510692.438) ( 17d 9'51.81"E, 58d43' 5.34"N)
Upper Right (  637509.613, 6519964.666) ( 17d22'47.38"E, 58d47'51.57"N)
Lower Right (  637509.613, 6510692.438) ( 17d22'26.92"E, 58d42'52.04"N)
Center      (  631429.906, 6515328.552) ( 17d16'19.15"E, 58d45'28.62"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
  NoData Value=255
  Overviews: 3037x2316, 1519x1158, 760x579, 380x290
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
  NoData Value=255
  Overviews: 3037x2316, 1519x1158, 760x579, 380x290
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
  NoData Value=255
  Overviews: 3037x2316, 1519x1158, 760x579, 380x290

The next step was to run gdalbuildvrt on the TIFF files in the folder and after that I have tried to run gdal2tiles on the vrt file. I have also tried with converting the vrt file into a BigTIFF file and then run gdal2tiles on this but the output is the same. It creates tiles but the result is just tiles that are either empty or have a small blurry map in the top left corner of the tile.

The gdal2tiles command:

gdal2tiles -w none -p raster -z 0-5 -s EPSG:3006 .\mosaic.tiff .\tiles

Output from gdalinfo on the mosaic tiff (8 GB)

    Size is 321292, 671889
Coordinate System is:
PROJCS["SWEREF99 TM",
    GEOGCS["SWEREF99",
        DATUM["SWEREF99",
            SPHEROID["GRS 1980",6378137,298.2572221010002,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6619"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4619"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",15],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","3006"]]
Origin = (269260.430000000050000,7504131.312749998600000)
Pixel Size = (2.042324906565529,-2.042324906565529)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=YCbCr JPEG
  INTERLEAVE=PIXEL
  SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left  (  269260.430, 7504131.313) (  9d34'37.40"E, 67d33'43.08"N)
Lower Left  (  269260.430, 6131915.674) ( 11d22' 0.37"E, 55d16'46.35"N)
Upper Right (  925443.084, 7504131.313) ( 24d56' 0.25"E, 67d20'46.70"N)
Lower Right (  925443.084, 6131915.674) ( 21d40'51.87"E, 55d 9' 1.22"N)
Center      (  597351.757, 6818023.493) ( 16d49'40.70"E, 61d29' 1.09"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
  NoData Value=255
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
  NoData Value=255
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
  NoData Value=255

Could the problem be that the mosaic have "holes" in it and/or that the single TIFF files is not perfectly georaphicaly aligned next to each other? I know that there are some maps missing to get a complete covering layer and that there are some "space" in between the maps.

Or is the TIFF file to big? I don't think that 8 Gb is a extremly big file..

Or does the output from gdalinfo on the files give anyone with more knowlege any information on what might cause this?

Could there by one or more of the single TIFF files that are "bad" in some way that causes this? If so, is there any way of detecting what file that it could be?

I am out of ideas. What can I do?

  • 8Gb is twice as large as the TIFF standard permits, so it is in fact too big. – Vince Feb 5 at 1:26

Your Answer

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

Browse other questions tagged or ask your own question.