1

I have a strange Band block size in my geotiff file - Block=566x1.

How can I rearrange this size to 512x512?

Here is complete gdalinfo:

Driver: GTiff/GeoTIFF
Size is 566, 419
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 = (13.273016488845716,46.615000000000592)
Pixel Size = (0.030029097963144,-0.030000000000001)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  13.2730165,  46.6150000) ( 13d16'22.86"E, 46d36'54.00"N)
Lower Left  (  13.2730165,  34.0450000) ( 13d16'22.86"E, 34d 2'42.00"N)
Upper Right (  30.2694859,  46.6150000) ( 30d16'10.15"E, 46d36'54.00"N)
Lower Right (  30.2694859,  34.0450000) ( 30d16'10.15"E, 34d 2'42.00"N)
Center      (  21.7712512,  40.3300000) ( 21d46'16.50"E, 40d19'48.00"N)
Band 1 Block=566x1 Type=Float32, ColorInterp=Gray
  Description = u10
Band 2 Block=566x1 Type=Float32, ColorInterp=Undefined
  Description = v10

1 Answer 1

4

Use the TILED=YES creation option of the GTiff driver, e.g:

gdal_translate -co TILED=YES -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 src.tif dst.tif

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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