I'm trying to downsample population data downloaded from https://www.worldpop.org/geodata/summary?id=24777 to lower resolution using the following command
gdalwarp -tr 0.1 0.1 -co TILED=YES -co COMPRESS=LZW /home/ppp_2020_1km_Aggregated.tif /home/ppp_2020_downsampled.tif
However the statistics for downsampled GeoTiff file are wildly different:
ORIGINAL:
Metadata:
STATISTICS_MAXIMUM=672314.9375
STATISTICS_MEAN=36.107581341026
STATISTICS_MINIMUM=0
STATISTICS_STDDEV=382.17835506557
STATISTICS_VALID_PERCENT=27.29
DOWNSAMPLED:
Metadata:
STATISTICS_MAXIMUM=198223773696
STATISTICS_MEAN=79130.423171493
STATISTICS_MINIMUM=-258876342272
STATISTICS_STDDEV=743223866.17039
STATISTICS_VALID_PERCENT=27.03
For instance the minimum of population should obviously never go negative. The default resampling method near shouldn't cause this either. Is there something obvious I'm missing?
