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
1
vote
2 answers

how to get better Kriging result graphs in openturns?

I performed spherical Kriging, but I can't seem to get good output graphs. The coordinates(x, and y) range from around around 51 latitude and around 6.5 as longitude my observations range from -70 to +10 here is my code : import openturns as…
1
vote
0 answers

How do I Resample two .asc elevation models in python? It does not need to be complex something like Nearest neighbour is good

I am very new to python and coding. I am trying to make the ice DEM(test5) fit over top of the NZ DEM so that the points line up. The data has different cell sizes. This is what I have so far. All it does is put the data into a numpy array at the…
Liam
  • 11
  • 2
1
vote
2 answers

Python geospatial interpolation (meteorological data)

My aim is to interpolate meteorological data from neighboring meteorological stations into the point with exact coordinates. In SciPy docs I found information about multidimensional interpolation ( from scipy.interpolate import griddata ). But…
Misha
  • 21
  • 1
  • 4
1
vote
0 answers

spatial interpolation for scattered data using natural neighbor in python

I'm trying to interpolate temperatures in a massive body made out of a scintillator called PbWO4. There are 10 outer temperature sensors called 'satellites' which help me refer to the inner temperatures at only 4 points. The main problem I'm facing…
1
vote
0 answers

R-interp: Same input & output coords (x,y,xo,yo), multiple data value vectors (z). Can I skip some steps?

I have to perform multiple 2-d linear interpolations from the same input coordinates (x,y) to the same output coordinates (xo,yo). Only the data values (z) change every time (z1,z2,z3,...). I have been using package interp on R. So far, I have been…
1
vote
0 answers

Spatial interpolation on a pandas Dataframe with a specific structure using a dictionary

Say I have a pd DataFrame that looks like this: price volume cat_count zipcode date 91111.0 01/01/2018 10 5 NaN 02/10/2018 NaN 9 NaN 94312.0 …
Mark Keane
  • 984
  • 2
  • 11
  • 26
1
vote
1 answer

Reclassify values in a RasterBrick by the use of an additional Raster (Digital elevation model)

I have a RasterBrick consisting of daily snow cover data with the values 1, 2 and 3 (1= snow, 2= no snow, 3= cloud-obscured). Example of snow cover of one day: > snowcover class : Large RasterBrick dimensions : 26, 26, 2938 (nrow, ncol,…
1
vote
1 answer

Haversine distance in sklearn.gaussian_process.kernels

Is there a builtin way to pass custom distance functions to be used by the kernels you could use for Gaussian Process Models? In particular, I have geographic data in lat/lon coordinates, so using Euclidean distances would not give accurate…
1
vote
0 answers

Interpolation across planar narrow-band level sets in OpenVDB

I'm aware of OpenVDB's voxel value interpolation for sparse point clouds, but I'm still learning. I have a triangle, and I find the narrow band level set of voxels it intersects. I assign the points in that level set to a point group and assign…
AaronF
  • 2,841
  • 3
  • 22
  • 32
1
vote
2 answers

How to simplify a spline?

I have an interesting algorithmic challenge in a project I am working on. I have a sorted list of coordinate points pointing at buildings on either side of a street that, sufficiently zoomed in, looks like this: I would like to take this zigzag and…
1
vote
1 answer

R: Autokrige.cv function in automap package generates NaNs

I’m fairly new to R and I am trying to make interpolations of temperature measurements that where gathered from different station across the Netherlands. I have data for about 35 stations that make measurements every 10 minutes covering a timespan…
T.Merkus
  • 11
  • 2
1
vote
3 answers

Duplicate data when using gstat or automap package in R

I am trying to using ordinary kriging to spatially predict data where an animal will occur based on predictor variables using the gstat or automap package in R. I have many (over 100) duplicate coordinate points, which I cannot throw out since those…
ms.elasmo
  • 13
  • 4
1
vote
1 answer

Cartesian to Spherical coordinate conversion specific case when Φ is zero and θ is indeterminant, Phase unwrapping

Following is the conversion for spherical to cartesian coordinate X = r cosθ sinΦ Y = r sinθ sinΦ Z = rcosΦ we are using the reverse computation to compute spherical coordinate from cartesian coordinate which is defined as r = √(x^2+y^2+z^2 ) θ…
1
vote
1 answer

interpolate missing lat, lon in dataframe with multiple trips per individual

I have the following dataframe (df) and would like to interpolate Lat, Lon coordinates at an equidistant interval (e.g. every 250 m) or time interval (e.g. every 2 min). > head(df) ID Latitude Longitude trip date.time 1 1 10.30447 -109.2323 …
tasmaniac
  • 33
  • 9
1
vote
1 answer

Interpolation resampling large irregular matrix or surface data points to regular grid

I am lost in all interpolation methods provided by great SciPy and can't find optimal way for my case. I have millions of XYZ points in matrix which has different intervals between points (cells) and also is rotated. Generally big datasets of points…
Miro
  • 599
  • 10
  • 29