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
26
votes
1 answer

Interpolation over regular grid in Python

I have been struggling to inteprolate the data for "empty" pixels in my 2D matrix. Basically, I understand (but not deeply) interpolation techniques such as Inverse Distance Weighting, Kriging, Bicubic etc. I dont know the starting point exactly…
Spider
  • 826
  • 3
  • 14
  • 34
24
votes
1 answer

Plotting interpolated data on map

I have survey data of species richness that was taken at various sites in the Chesapeake Bay, USA, and I would like to graphically present the data as a "heat map." I have a dataframe of lat/long coordinates and richness values, which I converted…
jslefche
  • 3,839
  • 7
  • 34
  • 47
11
votes
1 answer

Two-dimensional interpolation in R, without any extrapolation

I have a 2-dimensional array of data, with some missing values. There are three columns: x y intensity I can plot x against y in ggplot2, with intensity as a colour scale. I’d like to smooth the transitions between the colours, and have come…
CaptainProg
  • 5,188
  • 22
  • 67
  • 109
9
votes
2 answers

How can I interpolate station data with Kriging in Python?

Browsing the web I've found that some tools to use Kriging in Python are pyKriging and Gaussian Process Regression. However, I couldn't make any of them to work. The first one doesn't work for me (can't even import it): import pyKriging File…
lanadaquenada
  • 366
  • 2
  • 4
  • 18
9
votes
4 answers

How can I interpolate georeferenced data in python?

I have many lines of georeferenced hydrological data with weekly resolution: Station name, Lat, Long, Week 1 average, Week 2 average ... Week 52 average Unfortunately, I also have some data with only monthly resolution: Station name, Lat, Long,…
Martin Burch
  • 2,184
  • 1
  • 23
  • 53
8
votes
2 answers

Average values of a point dataset to a grid dataset

I am relatively new to ggplot, so please forgive me if some of my problems are really simple or not solvable at all. What I am trying to do is generate a "Heat Map" of a country where the filling of the shape is continous. Furthermore I have the…
Marco
  • 1,452
  • 16
  • 28
6
votes
0 answers

How to do smooth frame interpolation and extrapolation using OpenCV?

My source data files are weather radar images captured every 15 minutes. I'm trying to make a smooth interpolation of intermediate frames and I'm trying to extrapolate the motion onwards from the last measurement. So far, my method has been to…
6
votes
1 answer

OpenCV remap interpolation error?

I'm using opencv remap function to map an image to another coordinate system. However, my initial tests indicate that there are some issues with the interpolation. Here, I give a simple example of a constant 0.1 pixel shift for a image that is 0…
Julian S.
  • 358
  • 2
  • 13
6
votes
2 answers

Interpolate unstructured X,Y,Z data on best grid based on nearest neighbour distance for each points

This question was edited after answers for show final solution I used I have unstructured 2D datasets coming from different sources, like by example: Theses datasets are 3 numpy.ndarray (X, Y coordinates and Z value). My final aim is to…
user5002536
5
votes
1 answer

interpolate irregular x,y data points into regular grid for contour mapping

I am a Geologist needing to create few hundred consistent contour maps in a project with varying x y z data sets. Contouring irregular x y z data points involves creation of a 'grid' of interpolated (extrapolated) z values at a uniform x-y mesh.…
Srikanth G
  • 91
  • 2
  • 8
5
votes
1 answer

How to interpolate from nonuniform 2D locations to regular grid?

I have nonuniformly located samples of an image, and would like to interpolate to a regular grid because (among other things) most image graphics functions expect a regular grid. I notice there are some MatLab functions (see Image interpolation from…
Carl Witthoft
  • 19,580
  • 8
  • 40
  • 67
4
votes
1 answer

Creating data objects for interpolation methods such as kriging in R

I have daily meanvalues of temperature data at different locations (X1, X2, ...) and I would like to interpolate maps with them. I created a long format data objects by loading them from formatted excel sheets such as: library(reshape2) tempdata…
MojioMS
  • 1,092
  • 2
  • 11
  • 31
4
votes
1 answer

How to make Ordinary Kriging by using gstat predict

I am trying to write a code in R that use gstat library in order to create an interpolation. I have already read the gstat manual and based on some examples on internet I had managed to write this code (this is only a part): g <- gstat(id="tec",…
user1919
  • 3,422
  • 13
  • 50
  • 85
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,035
  • 2
  • 14
  • 34
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
1
2 3 4 5 6 7