I'm using gdal_proximity to find the distance to the nearest major river across the USA (lower 48 states). I've projected the NHD+ network flowlines to Conus Albers (epsg:5070), selected rivers with stream order > 5, and rasterized, burning rivers as 255, no river as 0. This much is fine, but now I need to find distance to nearest river for sites within 50km. The input file is at 30m resolution on continental scale, so is very large, but the conversion should be a simple gdal_proximity command:
gdal_proximity.bat -values 255 -distunits GEO -maxdist 50000 -nodata -999 infile.tif outfile.tif -co COMPRESS=DEFLATE -co BIGTIFF=YES -co TILED=YES
This seems to -almost- work, but is producing a weird geometric pattern in the output (see image). The data that are present in the output have processed correctly. Can anyone suggest why so much of the output is missing?
Edit: To test if this was caused by any of the optional parameters, I ran gdal_proximity again in this configuration:
gdal_proximity.bat H:\data\tmp\NHDplus_network_flowline_SO6plus.tif H:/data/tmp/NHDplus_network_flowline_SO6plus_proximity.tif -values 255 -maxdist 50000 -of GTiff
Which yielded essentially the same result:
My only thought is that it may be related to the size of the raster (~100 gb uncompressed. As far as I'm aware there isn't a limit to the size of a BigTiff, but maybe there's a limit to what gdal can analyse effectively?


