raster2pgsql ignoring nodata (seemingly)
Lorenzo Curcio
lorenzocurcio2 at gmail.com
Tue Nov 4 17:03:37 PST 2025
Hi,
I have a float32 multiband (6) GTiff raster that I'm trying to upload
(tiled, given that it's 110162 x 51992) to a postgis database.
The vast vast majority of this raster is empty / nodata (on all 6 bands).
(it only has data for rivers and covers all of europe, any part not near a
river is nodata). The statistics_valid_percent (for all layers) is barely
above 3%. Despite that, whenever I try to run raster2pgsql with -t auto
(and _without_ -k) it will always try and produce a 100+gb sql output file,
seemingly never actually eliminating any tiles.
I have tried everything I can think of, setting and resetting the raster
nodata in tons of ways, manually passing it in via -N, it just doesn't
change anything, raster2pgsql is always writing these huge output sql files
instead of properly culling tiles (the complete lack of verbosity in
raster2pgsql is not helping here . . for instance a simple print of what it
considers the band nodata to be would answer this question, but if such an
option exists it's not documented)
Are there any ideas on what could cause this to happen or any further
debugging steps?
Sorry if this is not the right place to ask - please point me to where the
right place would be instead if so.
Thanks, Lorenzo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20251105/cb45fcbf/attachment.htm>
More information about the postgis-users
mailing list