Skip to content

Interpolate #420

@DanDeepPhase

Description

@DanDeepPhase

Any interest in supporting interpolation along the axes?

I was able to hack it in my code with something like:

using Interpolations, DimensionalData
import Interpolations.interpolate

interpolate(da::DimArray) = interpolate(Array.(dims(da)), da, Gridded(Linear())) 

xs = ys = 1:10
zs = [rand() for x in xs, y in ys]
M = DimArray(zs, (Y(ys),X(xs)))

itp = interpolate(M)
itp[3.3, 5.1]
[itp[y,x] for y in 3.1:0.35:7.2, x in 2:4] 

I saw you use something in rasters for re-gridding, which i think this approach is best suited for. some tweaks would be needed to get reverse ordered vectors working.

There may be a more intrusive / better way to do this by extending or creating a variant of At()

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions