0

I set off some tasks running gdal2tiles.py for certain rasters with a zoom range of 8-20. To my dismay I return the next day to find only images for zoom level 20 have been created. I understand that this is a big range, but I don't think this should be a problem.

The command to generate images: gdal2tiles.py warped_file.tif output_dir --s_srs 'EPSG:4326' --zoom=8-20 --processes=3 --exclude

The warped file is produced by this command: gdalwarp -s_srs 'EPSG:27700' -t_srs 'EPSG:4326' file.tif warped_file.tif

Is there a reason why only zoom level 20 was created?

gdalinfo:

Size is 29404, 36007
Coordinate System is:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Origin = (-2.030342225189838,51.716732655211317)
Pixel Size = (0.000051188440515,-0.000051188440515)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_SOFTWARE=GRASS GIS 7.8.5 with GDAL 3.1.4
Image Structure Metadata:
  COMPRESSION=DEFLATE
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  -2.0303422,  51.7167327) (  2d 1'49.23"W, 51d43' 0.24"N)
Lower Left  (  -2.0303422,  49.8735905) (  2d 1'49.23"W, 49d52'24.93"N)
Upper Right (  -0.5251973,  51.7167327) (  0d31'30.71"W, 51d43' 0.24"N)
Lower Right (  -0.5251973,  49.8735905) (  0d31'30.71"W, 49d52'24.93"N)
Center      (  -1.2777698,  50.7951616) (  1d16'39.97"W, 50d47'42.58"N)
6
  • Your command looks good to me. Test it with a small image and you can see the result next minute.
    – user30184
    Aug 5 at 8:33
  • @user30184, yea I have done that and it's been fine.. But I haven't done it on the output of the warp command before, so I suspect it is that which is causing the problem
    – sobmortin
    Aug 5 at 8:38
  • Then warp a small image and test. However, lower zoom level tiles are built up from higher level base tiles (four tiles combined into one and resampled to bigger pixel size) and projection should not matter at this stage.
    – user30184
    Aug 5 at 9:16
  • What is the latitude/longitude extent of file.tif? There are 1.1 trillion level 20 tiles if it covers the whole world Aug 5 at 12:30
  • I have added the result of gdalinfo now - @BarryCarter. It is for a 100km2 grid of the UK only
    – sobmortin
    Aug 5 at 14:51

0

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.