You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.
Probably the same problem as in #99, but I ran into this in a different context so I'll post it in a new issue.
Writing a layer to a .tif file using geotiff() and then re-loading it (again with geotiff) can sometimes return a layer with different dimensions, as in this example:
using SimpleSDMLayers
coords = (left =-145.0, right =-50.0, bottom =20.0, top =75.0)
ref =SimpleSDMPredictor(WorldClim, BioClim, 1; coords...)
geotiff("test.tif", ref)
test =geotiff(SimpleSDMPredictor, "test.tif")
isequal(size(ref), size(test)) # not equal, 331 x 571 vs 331 x 570isequal(ref.left, test.left) # equalisequal(ref.bottom, test.bottom) # equalisequal(ref.top, test.top) # equalisequal(ref.right, test.right) # not equal
ref.right # -50.0
test.right # -50.16666666665
Looking at the exported tif file, the size and bounding coordinates look fine, so the problem is probably with the reading geotiff call (which returned correct dimensions in #99 on the other hand).
using ArchGDAL
d = ArchGDAL.read("test.tif") # correct raster size, 331 x 571
gt = ArchGDAL.getgeotransform(d)
gt[1] + gt[2]*ArchGDAL.width(d) # correct right bound, ≈ 50.0
The text was updated successfully, but these errors were encountered:
Probably the same problem as in #99, but I ran into this in a different context so I'll post it in a new issue.
Writing a layer to a .tif file using
geotiff()
and then re-loading it (again withgeotiff
) can sometimes return a layer with different dimensions, as in this example:Looking at the exported tif file, the size and bounding coordinates look fine, so the problem is probably with the reading
geotiff
call (which returned correct dimensions in #99 on the other hand).The text was updated successfully, but these errors were encountered: