TransWikia.com

Downsampling using GDAL Warp results in a huge difference in statistics

Geographic Information Systems Asked by Joonas on April 1, 2021

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?

One Answer

Here is my result using QGIS 3.12 on Windows 10.

enter image description here

Answered by Ralph Tee on April 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP