Closed tpoisot closed 4 years ago
This might be related to some things discussed in yeesian/ArchGDAL.jl#40, which links to something about projection issues. I think I see a way to experiment on this to figure out what is happening and how to fix it.
Part of the issue for landcover
is that they only go up to -56 of latitude, so this explains why the longitudes were OK, but the latitudes were not. Still no idea about bioclim
.
Same thing with bioclim
, which has even weirder bounds.
Even with the fixed boundaries for bioclim
and landcover
, the layers are not aligned -- this is a comparison between worldclim
(at 2 resolutions) and bioclim
, with the rows indicating the (0,0) and the dot being Paris (just because I have a vague intuition of where it is:
This looks more and more like a projection issue with everything non-worldclim
, so I need to do some digging to see how we can handle this from ArchGDAL. Or it can be that bioclim
is not using the same boundaries at they say they use in the paper. I don't know.
A very likely possibility is that the code to get a subset of the data is also not dealing with shifted latitudes correctly -- in which case the geotiff
function is wrong, and I need to understand how GDAL stores rasters.
These three are supposedly the same latitudes/longitudes (after #23) , so this is concerning - this is blocking #21
Interestingly, the longitudes seem to be right, and it's the latitudes that get shifted. This suggests that the problem is with finding the part of the buffer to read in
geotiff
. Alternatively,worldclim
seems to get the latitudes right, so maybe there is some weird GDAL thing going on withbioclim
andlandcover
, which would require to dig into the documentation.