Closed vlandau closed 4 years ago
When solving targets, I get the following error: ERROR: BoundsError: attempt to access 568×742 Array{Float64,2} at index [489:569, 1:41]
My input ascii file is 568x742, and I'm using radius = 40, block_size = 1, buffer = 0 I have tried a variety of block sizes and radii to get them to fit, but no luck yet getting it to solve without the BoundsError.
Is there a way to figure out which combinations of blocks/radius will work or not, depending on the number of source cells? Do I need to crop my input files to better dimensions? I can also attach the ini and input files if that will help.
Using julia 1.0.5
Can you run using Pkg; Pkg.status("Omniscape")
and post the output? Omniscape v0.2 requires Julia 1.4 or greater.
Ok, that might be the issue that I'm in an older Julia version. I haven't been able to get Julia 1.4.2 and GDAL and ArchGDAL to play well together yet so I was just trying to use Omniscape with the older Julia version.
julia> using Pkg; Pkg.status("Omniscape") ERROR: MethodError: no method matching status(::Pkg.Types.Context, ::String)
Are you on Windows by chance? If so see #47 -- wondering if you might be having similar issues to the user who posted (and solved!) it.
using Pkg; Pkg.status("Omniscape")
I'm not sure why this didn't work -- maybe something to do with the Julia version.
Are you on Windows by chance? If so see #47 -- wondering if you might be having similar issues to the user who posted (and solved!) it.
Yes, on Windows. At first thought it was an administrator-type problem on my work computer, but #47 solved it. Haven't gotten the Bounds error now with the updated Julia version. Thanks!
Awesome!! Glad you figured it out. I will add appending a note to the README/docs about GDAL issues to the to do list.
Omniscape settings/conditions that gave rise to this:
block_size = 41
radius = 167
buffer = 0
Source array dims: 18280x14496So
y
was < 41 pixels from array edge, which shouldn't happen. This appears to be an issue withget_targets
returning blocks that are not fully within the source array. The minimum number of rows (or columns) in a returned source should beradius + 1 + (0.5 * (block_size - 1))
. In this case that's equal to167 + 1 + 20 = 188
.