Questions tagged [spatial-interpolation]

Estimating new data points based on existing spatial observations

Spatial interpolation is a method of estimating new data points based on existing spatial interpolation. This tag focusses on spatial interpolation (data with a geographic component), although interpolation in a general also applies to e.g. timeseries.

Commonly, spatial interpolation involves using of the surrounding observations to estimate a new data point. This can be done using some kind of weighted mean (inverse distance weighted interpolation), by fitting a mathematical function through the existing points (splines), or a combination of both (kriging with external drift).

More information regarding which packages can be used to perform interpolation can be found on the Spatial Task View on CRAN, but in general the gstat, automap, Fields, and geoR packages are a good start for a wide range of spatial interpolation methods.

100 questions
1
vote
0 answers

Vectorize the generation of a 3D matrix made within a loop up to now

Up to now, I used 3 loops to build a matrix, but it takes such a long time that I would like to vectorize it. But either it's not possible, or I took the wrong way to do it. Anyway, I am in front of a wall, and I need your help. Here are the loops…
Nenuneix
  • 11
  • 1
1
vote
0 answers

scipy.interpolate.griddata bombs out when trying to interpolate over a rectangular array

I mark the bad pixels on an image with a boolean array. A bad pixel has a value of True and a good one a value of False. I use this routine for various images, none with the same dimensions. The code I use is: image =…
1
vote
0 answers

Algorithm for grid interpolation/regression given points with holes

I have an image containg a set of identical objects which are disposed into a regular grid fashon. The number of these objects is unknown. I need to find in a really accurate way the bounding rect of that set of objects and then generate the grid…
1
vote
1 answer

Interpolating Between Two Planes in 3d space

I'm developing a tool that lets you circle/enclose things on a 3d "volume." I want to save time by labelling "slices" 1 and 3, and "filling in" slice 2 from that information. Two easy solutions are to: 1. slice2 = slice1 AND slice3 (gets the…
Frederick
  • 1,201
  • 9
  • 28
1
vote
1 answer

Can regression and IDW spatial interpolation be done in one model in R?

I do spatial modelling of variable T (temperature). I use what is commonly used in literature - perform regression (using variables like altitude etc.) and then spatially interpolate the residuals using IDW. R package gstat seems to have this…
Tomas
  • 52,167
  • 46
  • 207
  • 345
1
vote
1 answer

Issue with cross-validation using the automap package

I want to do a cross-validation for the ca20-Dataset from the geoR package. With for example the meuse-dataset, this works fine, but for this dataset, I encounter a strange problem with the dimensions of the …
P_M
  • 318
  • 1
  • 7
1
vote
1 answer

plotting issue with autofitVariogram in automap

I am a newbie in R. I am using autofitVariogram to daily rainfall data of 50 stations.The sample data is provided below.Some of stations have missing values represented by "NaN" values. My question is regarding the variogramfit. The variogram…
user1142937
  • 294
  • 5
  • 17
1
vote
2 answers

grid point interpolation of wrf data to lat lon in python with numpy and scipy

Im new to python and I'm trying to write a function that will take a numpy array from a netcdf file with dimensions [time,height,longitude,latitude] and interpolate the function to a specified lat and lon. I have looked into scipy.interpolate but…
Barry Baker
  • 19
  • 1
  • 3
1
vote
1 answer

What are my options when I want to find a good interpolation for a coordinate in an irregular grid of values?

I have a list points and their values that cover an area like so: #x, y, value list = [ (1.123, 1.232, 15), (1.121, 2.323, 12), (1.124, 3.451, 17), (1.120, 4.593, 06), (1.121, 5.638, 09), (2.123, 1.232, 19), (2.121, 2.323, 72), (2.124, 3.451,…
AME
  • 2,119
  • 4
  • 23
  • 37
1
vote
2 answers

How I can do Spline Interpolation in R

I am a newbie in R and trying to do interpolation in R(sorry if it seems a lame question) . I have some Points(Lat,Lan and one integer value for each point) that I need to interpolate them. I am a GIS user I did it in ARCGIS but ArcGIS doesn't give…
Hank
  • 31
  • 1
  • 7
0
votes
1 answer

IDW(Inverse Distance Weighted) Interpolation in openlayers 6.4.3

I have a django3.1 web application with map using ol6 in which I want to show IDW. I have generated an idw image using python & added to map as an image layer but it does not overlay in accurate point positions. So I am looking for a method or…
0
votes
0 answers

Resampling/Interpolation of 3D Multi-class Mask without changing label values/scipy.ndimage.interpolation or RegularGridInterpolator

I have a 3D mask volume L with the following: print(L.shape) (170, 256, 256) print("L: ", np.unique(L)) L: [0 1 2 3 4 5 6 7 8] I want to downsample and then upsample the mask to its original size keeping the label values the same. Failed…
banikr
  • 11
  • 4
0
votes
0 answers

How can I fit the missing points on a grid of known dimensions?

I have a certain number of unsorted 2D points, and I would like to confirm that they belong to a grid of known dimensions and to infer the position of the missing points. The simplest possible case for this problem is of an unrotated grid, which I…
Eggman
  • 53
  • 1
  • 11
0
votes
0 answers

interpolation of a non-quadratic 2d matrix

I am trying to interpolate a non-quadratic 2d matrix but I have only been able to interpolate in a quadratic way with the scipy interp2d library like the following example. import numpy as np from scipy import interpolate d = np.array([[5 , 0, …
0
votes
0 answers

How to interpolate (map) data from one irregular 3D grid to another?

I have 2 different irregular grids for one geometry. The first one (high-fidelity) has 2,488,321 mesh points (x_hf, y_hf, z_hf, quantity_hf). I want to interpolate (or map) these values to a different (low-fidelity) grid (x_lf, y_lf, z_lf) with…
Arsen
  • 81
  • 6