We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crop
using Rasters, RasterDataSources, ArchGDAL using TiledIteration # easy splitting into tiles dem = Raster(WorldClim{Climate}, :tmin, month = 1) ras = read(view(dem, 1:10, 1:10)) ext = Extent(X=(lookup(ras, X)[2], lookup(ras, X)[7]), Y=(lookup(ras, Y)[7], lookup(ras, Y)[2])) new_ras = zero(view(ras, ext)) tile_ranges = collect(TiledIteration.TileIterator(axes(ras), (5, 5))) ras_tiles = (inds -> ras[inds...]).(tile_ranges) sub_tiles = read.(view.(ras_tiles, (ext,))) crop(new_ras, to = sub_tiles[1]) # here's the test size(crop(new_ras, to = sub_tiles[1])) == size(sub_tiles[1]) # false?! # it's wrong the other way too, in this case size(crop(sub_tiles[1], to=new_ras)) == size(sub_tiles[1]) # false
The text was updated successfully, but these errors were encountered:
This might be the same problem as #751, but in a different place...
Sorry, something went wrong.
Hmm I'll take a look. So much trouble getting extents right .
But what is new_ras ? I think your MWE is missing something
new_ras
Oops...edited, thanks. It's a zeroed out array with that Extent.
No branches or pull requests
The text was updated successfully, but these errors were encountered: