using GeoStatsBase
using GeoEstimation
A = Array{Union{Missing,Float64}}(rand(100,100))
A[2,2] = missing # set only 1 value to missing
𝒟 = georef((z=A,), origin=(0.,0.), spacing=(1.,1.))
𝒫 = EstimationProblem(𝒟, 𝒟.domain, :z)
@time r = solve(𝒫, IDW())
A_interpolated = reshape(r[:z], (100,100))
𝒟new = interpolate(𝒟, inds)
EstimationProblem
is a more general problem where the domain of estimation doesn't necessarily match the domain of the data. Think of applications in geosciences where the data is only available along drillholes and the domain is a 3D grid model.
view(𝒟.domain, LinearIndices(size(A))[ismissing.(A)])
𝒟
is a Tables.jl table. So you could find the missing rows with some table filtering operation instead of using the LinearIndices
hack above.
] update
in your environment or ] update GeoStatsBase
to only update the package.
sol = solve(prob, solver);