I downloaded the UN population density raster map (the 2020 prognosis) from here. I want to open this data in QGIS and have it projected correctly, but I can't seem to figure out how.
The following files are in the archive:
I am not sure what the xml files are for, but I know the tfw file is used to georeference the image so that the pixel coordinates can be mapped to WGS84 coordinates.
If I open the gpw-v4-population-density-adjusted-to-2015-unwpp-country-totals_2020.tif
, which appears to be the main file, as raster file in QGIS, I get a correctly georefenced outline of the landmass of the world, but without any values representing population density (see here).
If I open the gpw-v4-population-density-adjusted-to-2015-unwpp-country-totals_2020.tif.ovr
as raster file in QGIS, I get the population densities, but without proper georeferencing (see here). Strangely, this file seems to contain all relevant information, but is 1/4 the size of the other file, which seems to be useless.
How can I open the files in such a way that I have the population densities with the correct georeferencing? I thought QGIS would know how to do this automatically, but apparently not...
I think the problem is not that the data aren't loading in the first image, but rather, that they aren't being displayed the way you think they are.
Because the histogram of the population values is strongly skewed, QGIS loads 0,0 as the min,max values and everything shows up as black.
Try going into the style tab of the layer properties, and changing the "min" and "max" values to something like 1 and 50.
Alternately, you could classify them manually by changing the render type to "singleband pseudocolor" Like this image here