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.

119 questions
3
votes
2 answers

How to interpolate between n colors by a fractional contribution for each color?

How can I interpolate between n colors. Simple case of 2 colors Consider a more simple case first, where we want to find the mid-point of 2 colors. Color1 is RGB ( 255, 0, 0 ) // Red Color2 is RGB ( 128, 128, 128 ) // Grey The solution being the…
3
votes
2 answers

Could someone describe a 2d interpolation method that is better than bilinear interpolation?

I have a grid of data points that I currently use Bilinear interpolation on to find the missing points in the grid. I was pointed in the directions of Kriging aka thee best linear unbiased estimator, but I was unable to find good source code or an…
Bob
  • 1,065
  • 2
  • 16
  • 36
3
votes
1 answer

Expanding my interpolation grid for kriging in R

I want to create an interpolation grid consisting of spatial data points to later use for kriging in R. I have been working in the sp and gstat packages. The code I am working with works, but my grid does not include all of the points and I want to…
Tricia
  • 33
  • 3
3
votes
1 answer

Autokriging spatial data

I'm trying to use a kriging function to create vertical maps of chemical parameters in an ocean transect, and I'm having a hard time getting started. My data look like this: horiz=rep(1:5, 5) depth=runif(25) value = horiz+runif(25)/5 df <-…
Drew Steen
  • 16,045
  • 12
  • 62
  • 90
2
votes
1 answer

Spatial data with duplicates and missing points

I am analysing data from an egg survey. Data is available from different points in the North Sea, some stations are recorded double at different dates. The sea should be covered by 0.5 x 0.5 degree squares. I have two questions for which I couldn't…
keebock
  • 131
  • 2
2
votes
2 answers

Is there a way in R i can create a new polygon (representing a certain constant value) based on two polygons representing 2 different constant values

I have two polygons, an outer polygon and an inner polygon The inner polygon is a polygon pol1 (red) for a parameter with a value = 10 The outer polygon is a polygon pol2 (blue) for a parameter with a value = 20 I need to draw a polygon for a…
jjunju
  • 505
  • 1
  • 5
  • 18
2
votes
1 answer

spatial interpolation with gaussion process regression

I have a csv-file with 140.000 points(rows). It consists of: longitude value latitude value subsidence value at specific points. I assume that these points are spatially correlated. I want to perform a spatial interpolation analysis of the area of…
2
votes
1 answer

Geographic Interpolate in Python

I have 500 points with longitude x, latitude y, altitude z, and the value at these points. On the other hand, I have other 200 points than I would like to interpolate, where the latitude, longitude, and altitude are known. I would like to…
Francisco Gonzalez
  • 437
  • 1
  • 3
  • 15
2
votes
1 answer

How to interpolate 2D spatial data with kriging in Python?

I have a spatial 2D domain, say [0,1]×[0,1]. In this domain, there are 6 points where some scalar quantity of interest has been observed (e.g., temperature, mechanical stress, fluid density, etc.). How can I predict the quantity of interest at…
Michael Baudin
  • 1,022
  • 10
  • 25
2
votes
0 answers

Python, projection and interpolation of 1d data onto 3d grid (head surface EEG power)

I have a 1d array (voltage of EEG) for 26 EEG channels, I also have the 3d coordinates of the EEG channels. x = np.array([ 84.06, 83.74, 41.69, 51.87, 57.01, 51.84, 41.16, 21.02, 24.63, 21.16, -16.52, -13.25, -11.28, …
2
votes
1 answer

interpolating 1D array into 3D array grid in python

I have a 1D array with 81 numbers that corresponds to 81 temperature every 2.5 meters depth and I need to interpolate it to a 3D array grid that has 100 points in z-dir, 6 points in x-dir, and 599 points in y-dir. My function to create the 1D values…
moehbon
  • 41
  • 7
2
votes
1 answer

smooth (Lon, Lat, Value) data over shapefile

I am trying to plot a data with (Lat, Lon) and a value in each location. What I need to do is to plot the data over a shapefile, represent each value with a different color, and smooth the values, so no gaps occur in the map. The data has the…
2
votes
2 answers

How slow is too slow when kriging with gstat in R

I am trying to use the krige function in the gstat package of R to interpolate some spatial ocean depth data in R. I am finding for more than about ~1000 points, the function starts taking unreasonable amounts of time to finish (i.e., hours to days…
user3004015
  • 617
  • 1
  • 7
  • 14
2
votes
1 answer

Linear interpolation in two dimensions produces results outside of the data range

I am using the interp2d method to produce liner spline functions. With certain point sets the resulting function is producing results that I would not expect. E.g.: from scipy import interpolate x = [81, 81, 81, 83, 83, 83] y = [ 9, 7, 5, 9, 7,…
Luís de Sousa
  • 5,765
  • 11
  • 49
  • 86
2
votes
3 answers

2-D grid interpolation for time series in python

I am working with climate data derived from a netCDF file. Data from different models come at different resolutions - because of this, it is necessary to "regrid" the models to a common grid resolution. The data is 3-D (time, latitude, longitude).…
csg2136
  • 235
  • 4
  • 10