122 questions
0
votes
1
answer
101
views
How to efficiently compute spatial interpolation of a long time series data?
I have a time series data with 260 time steps and 82k point observations at each time step. The points do not follow a regular gridded pattern, but the locations remain constant throughout the time ...
1
vote
1
answer
136
views
How does SciPy's RegularGridInterpolator handle duplicate points?
I cannot find in the documentation how SciPy's RegularGridInterpolator handles duplicate values within the grid.
For instance, if my points are a regular grid np.meshgrid of x and y values and my ...
0
votes
1
answer
229
views
QR decomposition with increasingly large errors
I received a code to work on and it has a QR decomposition subroutine as shown below. When checking this QR decomposition using the error calculation I added at the end of it, I found the error ...
3
votes
1
answer
145
views
Create scatteredInterpolant for data with double value points
I have tabulated data, containing fluid properties, that I want to use for interpolation. The grid itself is not regular on some points, so I want to use scatteredInterpolant for interpolation.
...
1
vote
0
answers
666
views
How to interpolate missing values given a SpatRaster object in R Terra package?
I would like to interpolate the missing values (set to 0) within my SpatRaster object.
I created a SpatRaster object and assigned values to specific cells depending on cell coordinates:
raster_layer &...
0
votes
0
answers
56
views
Add padding to CubeSpline interpolation curve
I have the a set of points and I pass a curve through them, using scipy CubeSpline, I really would like to know how can I add padding from outside, so that the curve is fitting the flow of the points ...
1
vote
0
answers
259
views
IDW Interpolation of point rainfall data using Python
I am trying to plot the interpolation maps in Python for the point rainfall data. I have given the shapefile of the study area as my extent boundary for the interpolation, however, the code only gives ...
0
votes
1
answer
444
views
Rasterize overlapping sf objects in R and specify which values to use for pixels
I have an sf dataframe with multiple polygons in R (each row is a square in a slightly different location with a different value associated with it). There are also some gaps between the polygons. I ...
0
votes
1
answer
269
views
First call to interpolator constructed by LinearNDInterpolator (with precomputed triangulation) slow regardless of grid size or values
I am using Scipy to interpolate several fields that are on a large irregular grid onto a regular one. I have precomputed the Delaunay triangulation of the grid and pickled it. Constructing the first ...
2
votes
2
answers
301
views
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 ...
1
vote
2
answers
105
views
Vectorized method to insert arrays of different length at different spots in an ndarray
I'm trying to "expand" a 2D numpy array nadir of points (x,y,z), and fill gaps in space with interpolated points. Where there exist spatial gaps bigger than some tolerance dist, I want to ...
0
votes
1
answer
522
views
Inverse Distance Weighting with gstat
I am attempting to execute an idw interpolation with gstat but am unable to.
text =
name,long,lat,waterLevel,elevation,depth
EM_01,18.553392,-34.07027,14.4,20.358,63.0
EM_27,18.574777,-34.068709,16....
1
vote
0
answers
122
views
Area Weighted Average Grid Interpolation
I would like to resize an n-dimensional grid similar to scipy.ndimage.affine_transform.
For the stake of simplicity, I describe my problem with the 2-Dimensional case.
I need to downsample an image ...
0
votes
1
answer
546
views
Spatial Interpolation Map Temperature using ggplot in R
I would like to create 3 maps of spatial interpolation of a country (like belgium) using the GADM geopkg data that can be found there : https://gadm.org/download_country.html.
The idea would be to ...
0
votes
1
answer
469
views
2D slice from 3D volume (interpolation)
I have a 3D volume (black) with each voxel having a known 3D coordinates (x,y,z), and a corresponding intensity value f(x,y,z).
Now I like to get a slice (blue) from the 3D volume. All (xq, yq, zq) ...
0
votes
0
answers
133
views
Interpolation with tempdisagg package in R
I have a daily frequency data of stock prices with some missing values and I want to interpolate them using the package tempdisagg. Does anyone have an example of interpolation with this package?
I ...
0
votes
1
answer
207
views
st_interpolate_aw returns error - replacement has x rows, data has y
I am working to re-aggregate population counts from one administrative level to another. One particular row keeps returning the error "replacement has 4 rows, data has 2".
I have tried ...
1
vote
2
answers
107
views
Drawing something resembling contour lines for an annually advancing ray of fungi?
I would be happy for any tips for drawing something resembling contour lines for the growth advancement lines around a fungal fairy ring that advances annually uphill. This is a plot of the records of ...
1
vote
0
answers
301
views
Different results between kriging on residuals and universal kriging (R)
I have a dataset with 132 observations, 1 response variable (Lopend_gemiddelde), and 9 predictors on which I perform three methods: 1) multiple linear regression (MLR), 2) kriging on the residuals (...
1
vote
0
answers
521
views
Universal kriging has a long processing time compared to other kriging methods - R
I have a dataset data_sp with 132 observations containing 9 predictors and 1 response variable. I perform a twenty-fold cross validation, using ordinary kriging and universal kriging. The raster ...
0
votes
0
answers
685
views
is there any interpolation method in python which is similar to Empirical Bayesian Kriging?
EBK Regression Prediction is ESRI propriety tool for interpolation. But I am looking for some open source solution with same method Empirical Bayesian Kriging. I have 10 location rainfall data. I want ...
1
vote
0
answers
61
views
Extracting spatially IDW interpolated z-point data using specified x, y inputs?
I was able to do an IDW ppp spatial interpolation in respect to a Datum level based on corresponding longitude, latitude coordinates for a grid I've specified. Although I achieve the desired plot, I ...
0
votes
0
answers
182
views
How to resample a 2-D spatial matrix (not a time series) using a weighted average to from the 1km grid to the 0.25 degree
I have a bumpy matrix A with shape [num_X, num_Y]. The corresponding lattitude and longitude array is A_lat (of size [num_Y,1]) and A_lon (of size [num_X,1]). And the each element of this matrix for ...
1
vote
0
answers
227
views
Interpolate temperature values (with associated lat and lon values) at different depth intervals using Krig function in the 'fields' package
I have temperature data points in different depth intervals with associated lat long values across the study area. I want to make a raster and then interpolate between cells of the raster where there ...
1
vote
1
answer
985
views
xarray interp variable with two dimensional gird into one point
I have a dataset with two-dimension lon/lat and I want to calculate the value of one certain point.
The ncfile can be download from ftp://ftp.awi.de/sea_ice/product/cryosat2_smos/v204/nh/LATEST/ and ...
0
votes
1
answer
291
views
Aggregate interpolated data at county level with R
The raw data is at the state level and I would like to go down to the county level. To do this, I first adjusted the data to county level and then interpolated it.
The raw data on state level looks ...
0
votes
1
answer
338
views
Reduce artifacts when resampling a Brain MRI scan using scipy affine_transform
I have a Brain MRI. It is gray scale with 20 slices. I put it into a numpy array with shape (20,256,256). I use scipy.ndimage affine_transform to rotate and resample the array as below.
The dark ...
0
votes
1
answer
942
views
Is it possible to do interpolation over 4d data?
I am trying to implement this paper. I have to try to interpolate the latent code of an autoencoder, as mentioned in the paper. The latent code is the encoded input of an autoencoder. The shape of the ...
0
votes
1
answer
634
views
Filling Missing data in shapefile using spatial interpolation python
This is my first question. I am new to python so please bear with me.
I have a shapefile that contains data as given below.
ID Data geometry
111 0.1 POINT(X,Y)
112 0.2 POINT(X,Y)
113 0.5 ...
0
votes
0
answers
173
views
Problem loading mlr package in R due to memory limit
I am trying to reproduce the example of Spatial interpolation / prediction using Ensemble Machine Learning
for which I need to use the "mlr" package
I have installed it and everything is ...
1
vote
2
answers
437
views
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 +...
3
votes
1
answer
1k
views
Spatial interpolation with Gaussian Process regression [closed]
I have a CSV file with 140 000 points (rows). Each row consists of:
Longitude value.
Latitude value.
Subsidence value at specific points. I assume that these points are spatially correlated.
I want ...
1
vote
0
answers
141
views
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 ...
0
votes
1
answer
630
views
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 ...
5
votes
2
answers
1k
views
How to Deal with Lat/Lon Arrays with Multiple Dimensions?
I'm working with Pygrib trying to get surface temperatures for particular lat/lon coordinates using the NBM grib data (available here if it helps).
I've been stuck trying to get an index value to use ...
2
votes
2
answers
8k
views
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
( ...
0
votes
0
answers
99
views
What is a non rational function and how to choose its degree?
I am trying to approximate a surface from a set of given points in 3D space in sets like
[[X1,Y1,Z1],[X2,Y2,Z2],.....] and I found this very nice library called geomdl
this approximates the surface ...
0
votes
1
answer
640
views
Polygon boundary interpolation in R
I have a polygon dataframe:
With vertice coordinates:
43740.95 40726.46
43741.36 40720.19
43742.67 40729.28
43743.99 40716.16
43745.52 40730.97
43748.72 40714.19
43748.72 40731....
0
votes
1
answer
435
views
Gridding irregular scatter data on basemap, trying different resolutions
I am trying to regrid/interpolate within a grid of a certain size, my dataset of irregularly scattered location (lat lon) tied variable values. My data is available as a dataframe with columns marking ...
0
votes
1
answer
701
views
How can I extract (x,y,z) values from an interpolated grid in Python
I am working with scipy.interpolate() and create a map using a methodology similar to the example. So, I need to use the X, Y, Z values from the interpolated surface in another software. How can I ...
0
votes
1
answer
1k
views
Python Scipy : RBF interpolation gives "wrong" result
This is my data :
a b c
732018 2.501 95.094
732018 3.001 91.658
732018 3.501 89.164
732018 3.751 88.471
732018 4.001 88.244
732018 4.251 88.53
732018 4.501 89.8
732018 4.751 ...
0
votes
0
answers
317
views
Interpolate NA values for 2d grid in R
I have a dataset with observations and I need to interpolate it over the grid. I used idw function from gstat package. It makes interpolation but leaves some values as NA. I also tried interp funtion ...
2
votes
1
answer
2k
views
Geographic Interpolate in Python [closed]
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, ...
0
votes
0
answers
510
views
How to perform spline interpolation on GPS coordinates?
I have GPS coordinates in a CSV file that I predict it using a regression model, just two columns with longitudes and latitudes that represent a race track. Now I want to plot it on Google Maps to see ...
1
vote
0
answers
680
views
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 ...
2
votes
1
answer
7k
views
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.). ...
0
votes
1
answer
198
views
r - How to color map/land areas, given points of 2 categories?
I'm going to create a map of the Papuan/Austronesian language distribution similar to this in R.
To do so, I collected the geo-references of languages listed in transnewguinea.org and in the ...
2
votes
0
answers
600
views
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, ...
0
votes
1
answer
1k
views
interpolate data to triangular mesh
There are a lot of questions (and answers) available for people interpolating unstructured data to structured output. solutions to which include mesh grid or bivariate splines. However I'm looking for ...
1
vote
0
answers
219
views
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 ...