# Grid data with interpolation

**URL:** <https://discourse.julialang.org/t/grid-data-with-interpolation/100574>\
**Category:** General Usage\
**Tags:** question, plotting, interpolations\
**Created:** [June 19, 2023, 7:52pm UTC](https://discourse.julialang.org/t/grid-data-with-interpolation/100574 "2023-06-19T19:52:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukas\_r](https://avatars.discourse-cdn.com/v4/letter/l/f6c823/32.png) [@lukas\_r](https://discourse.julialang.org/u/lukas_r)\
**Post date:** [June 19, 2023, 7:52pm UTC](https://discourse.julialang.org/t/grid-data-with-interpolation/100574/1 "2023-06-19T19:52:02Z")

</div>

Hi All,

I have two equidistant vectors (longitude and time) that make up a “grid” in which I want to plot velocity measurements. The velocity data points have corresponding longitudes and times, however not all of those will neccessarily be represented in the equidistant vectors, since I have more datapoints than the length of the equidistant vectors. Is there a function or package which would allow me to do this?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)\
**Post date:** [June 19, 2023, 8:58pm UTC](https://discourse.julialang.org/t/grid-data-with-interpolation/100574/2 "2023-06-19T20:58:59Z")

</div>

If I understand your use case correctly, [ScatteredInterpolation.jl](https://eljungsk.github.io/ScatteredInterpolation.jl/stable/#Gridding-of-data-1) should do the trick. I’ve personally used `scipy.interpolate.LinearNDInterpolator` via PythonCall.jl, which uses linear rather than radial basis function interpolation.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [June 19, 2023, 9:49pm UTC](https://discourse.julialang.org/t/grid-data-with-interpolation/100574/3 "2023-06-19T21:49:53Z")

</div>

The GMT [gridit](https://www.generic-mapping-tools.org/GMTjl_doc/documentation/utilfuns/#gridit) is a wrapper function to the several interpolation methods in GMT+GDAL  
It could have a richer manual (that’s the intention) but given that it is a wrapper function, original methods have better documentation.
