Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Loading parts of the datasets give different regions on different datasets #24

Closed
tpoisot opened this issue Jul 12, 2020 · 5 comments · Fixed by #21
Closed

Loading parts of the datasets give different regions on different datasets #24

tpoisot opened this issue Jul 12, 2020 · 5 comments · Fixed by #21
Labels
bug Something isn't working

Comments

@tpoisot
Copy link
Member

tpoisot commented Jul 12, 2020

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 with bioclim and landcover, which would require to dig into the documentation.

chelsa-heatmap
lc-heatmap
worldclim-heatmap

@tpoisot tpoisot added the bug Something isn't working label Jul 12, 2020
@tpoisot tpoisot changed the title Loading parts of the datas give different regions on different datasets Loading parts of the datasets give different regions on different datasets Jul 12, 2020
@tpoisot
Copy link
Member Author

tpoisot commented Jul 12, 2020

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.

@tpoisot
Copy link
Member Author

tpoisot commented Jul 13, 2020

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.

@tpoisot
Copy link
Member Author

tpoisot commented Jul 13, 2020

Same thing with bioclim, which has even weirder bounds.

@tpoisot
Copy link
Member Author

tpoisot commented Jul 13, 2020

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:

range-comparison-chelsa
range-comparison-worldclim-5
range-comparison-worldclim-10

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.

@tpoisot
Copy link
Member Author

tpoisot commented Jul 13, 2020

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.

tpoisot added a commit that referenced this issue Jul 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant