=== Step 1: inspect the four Copernicus GLO-30 tiles on AWS === tile size_px blocks overviews compress predictor file_MB thumb_requests thumb_MB N53_00_W005_00 2400 x 3600 1024x1024 [2, 4, 8] DEFLATE 3 5.8 2 0.10 N53_00_W004_00 2400 x 3600 1024x1024 [2, 4, 8] DEFLATE 3 11.4 2 0.18 N52_00_W005_00 2400 x 3600 1024x1024 [2, 4, 8] DEFLATE 3 10.1 2 0.16 N52_00_W004_00 2400 x 3600 1024x1024 [2, 4, 8] DEFLATE 3 30.9 2 0.43 crs: EPSG:4326 | pixel size (deg): (0.0004167, 0.0002778) | nodata: None AOI in BNG: (250000, 330000, 300000, 380000) -> lon/lat bounds: (-4.2521, 52.8466, -3.4867, 53.3075) === Step 2: what a windowed read costs, against downloading the whole file === tile N52_00_W004_00: 30.9 MB on S3 (eu-central-1); median of 3 runs job pixels requests MB pct_of_file seconds open: header only - 1 0.016 0.053 0.086 5 km window, full resolution 192 x 180 2 2.753 8.909 0.241 whole tile via rasterio 2400 x 3600 4 22.820 73.857 1.543 download whole file (requests.get) - 1 30.897 100.000 2.039 === Step 3: mosaic the four tiles and reproject to British National Grid === rasterio.merge: 1885 x 1731 px in EPSG:4326 from 4 remote tiles, 10 range requests, 17.86 MB, 1.6 s N53_00_W005_00: window 629 x 1142 px N53_00_W004_00: window 1257 x 1142 px N52_00_W005_00: window 629 x 589 px N52_00_W004_00: window 1257 x 589 px reprojected to EPSG:27700 at 25 m: 2000 x 2000 px in 0.19 s; NaN pixels: 0 elevation min/mean/max (m): -1.7 / 264.6 / 1071.8; sea and lakes at 0 m or below: 6.2% === Step 4: write a plain GeoTIFF, then COGs with different compression and block sizes === plain GeoTIFF (GDAL defaults): 16.02 MB, valid COG: False variant block MB write_s valid overviews max_abs_error_m DEFLATE, no predictor 512 17.070 0.844 True [2, 4] 0.0 DEFLATE + predictor 512 13.194 0.776 True [2, 4] 0.0 ZSTD + predictor 512 12.907 0.585 True [2, 4] 0.0 LERC_ZSTD, max error 0.1 m 512 5.299 0.277 True [2, 4] 0.1 DEFLATE + predictor 256 13.383 0.814 True [2, 4, 8] 0.0 DEFLATE + predictor 1024 12.496 0.702 True [2] 0.0 rio-cogeo COG: 13.19 MB in 0.85 s; valid COG: True; errors: []; warnings: [] === Step 5: internal tiling and overviews === compression: DEFLATE | COG layout: COG | predictor: 3 IFD level 0: 2000 x 2000 px, blocks 512 x 512, decimation 0 IFD level 1: 1000 x 1000 px, blocks 512 x 512, decimation 2 IFD level 2: 500 x 500 px, blocks 512 x 512, decimation 4 === Step 6: cut 25 COG tiles on the Ordnance Survey 10 km grid (input for part 2) === 25 tiles of 400 x 400 px, all valid COGs: True, total 12.72 MB tile valid kB min_m max_m SH65 True 537.8 53.6 1071.8 SH66 True 521.6 33.0 1059.2 SH76 True 549.8 1.0 875.1 SH75 True 546.4 8.2 865.0 SH83 True 508.7 158.5 846.5 === Step 7: range reads from our own files over HTTP === file job pixels requests MB pct_of_file ms plain GeoTIFF 2 x 2 km window at Yr Wyddfa 80 x 80 4 0.689 4.302 12.000 plain GeoTIFF whole area at 1/16 resolution 125 x 125 5 15.976 99.693 1085.806 plain GeoTIFF whole file, full resolution 2000 x 2000 5 16.025 100.000 1006.250 COG 512 px blocks 2 x 2 km window at Yr Wyddfa 80 x 80 3 1.393 10.555 18.332 COG 512 px blocks whole area at 1/16 resolution 125 x 125 2 0.721 5.464 12.887 COG 512 px blocks whole file, full resolution 2000 x 2000 2 9.868 74.793 866.849 COG 256 px blocks 2 x 2 km window at Yr Wyddfa 80 x 80 3 0.359 2.681 10.762 COG 256 px blocks whole area at 1/16 resolution 125 x 125 2 0.197 1.469 8.490 COG 256 px blocks whole file, full resolution 2000 x 2000 2 9.860 73.678 812.067 COG 1024 px blocks 2 x 2 km window at Yr Wyddfa 80 x 80 3 4.922 39.385 128.039 COG 1024 px blocks whole area at 1/16 resolution 125 x 125 2 2.654 21.240 88.044 COG 1024 px blocks whole file, full resolution 2000 x 2000 2 9.875 79.022 810.774 highest pixel within 1 km of Yr Wyddfa: 1071.8 m (published summit height 1,085 m) highest native GLO-30 pixel in the same area: 1074.5 m === figures === wrote 01-source-tiles-overviews.png, 02-mosaic-reproject-steps.png, 03-internal-tiles-overviews.png, 04-compression-blocksize.png, 05-range-request-bytes.png, 06-eryri-cog-tile-grid.png