Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-1 votes
1 answer
247 views

Performing empirical bayesian kriging in R

I am trying to apply empirical bayesian kriging in R, but I cannot find a package that provides a function for EBK. Does anyone know of any or should I use ArcGIS?
epihiv's user avatar
  • 1
0 votes
0 answers
52 views

Clip a SpatialGrid using a SpatialPolygon

In order to perform kriging methods using automap::autoKrige I need to provide a SpatialGrid for which values can be predicted. I would like to reduce the rectangular grid to the actual area (in this ...
M.Teich's user avatar
  • 115
1 vote
1 answer
75 views

Improving kriging results from transect data

I have estimates of fish density along transects from a lake and would like to extrapolate these estimates for the entire lake surface, using kriging methods. Based on information from here, here and ...
M.Teich's user avatar
  • 115
0 votes
0 answers
60 views

Unexpected artifacts when creating a digital terrain model (DTM) using lidR and gstat libraries in R

I'm using the lidR, raster, sp, and gstat libraries in R to create a Digital Terrain Model (DTM) from LiDAR data. I'm encountering unexpected artifacts in my DTM and I'm unsure why. Here is my code: ...
Purple_Ad's user avatar
1 vote
0 answers
52 views

Generate simulations using variogram with given mean and standard deviation

I am trying to generate simulations using variogram using the R code below library(sp) library(gstat) library(ggplot2) library(tidyverse) library(dplyr) library(reshape2) # Call data points <- ...
Happier's user avatar
  • 77
1 vote
1 answer
77 views

Kriging: extract data for other unknown points

I have one month of data that I converted to STDFDF. #set the spatial location of the regions Data.loc <- data.frame(Stat = c("Firmo","Citta dei Ragazzi", "Rende", ...
Elena Iakimova's user avatar
0 votes
0 answers
45 views

How to stack/merge geom_stars items/plots in one - in R

If I have plotted the Relative Error Maps for the Silt soil attribute for the following 4 different soil types: Cambisols, calcisols, leptosols and fluvisols that form my study case area: ggplot() + ...
Dimitris K's user avatar
0 votes
0 answers
240 views

Spatial Outliers Detection and Remove in R?

I have run my data in R, and created a distribution mapof my data (Clay Soil Property). I want to detect in a way the spatial outliers that i can see from the map, and remove them in order to execute ...
Dimitris K's user avatar
0 votes
1 answer
232 views

Spatio-temporal Kriging and how extract specific values

I have several years of data that needs to be converted to STDFDF. Shapiro.test and Adf.test talk about non-stationarity and non-normal distribution. particolato_May2021 <- read.delim(file = "...
Elena Iakimova's user avatar
0 votes
0 answers
242 views

How to create a Grid in R for Kriging

I have done my work for creating variograms etc, and i would like to run kriging. I've loaded my dataset, and i know that i should create a grid file, but i don't know how. I have the shapefile from ...
Dimitris K's user avatar
1 vote
1 answer
229 views

Kriging with gstat and Gaussian model produces bad outputs

I am trying to produce kriging models from elevations points using the gstat package. I can fit models to the empirical variogram using exponential, spherical, and Gaussian curves. However, despite ...
jkelley's user avatar
  • 11
0 votes
1 answer
94 views

Using a dynamic formula with parrallel kringing in R

I am trying to achieve parallel Kriging in R on several variables using a loop. Here is a reproducible example using data meuse and a code for parallel kriging that I found here. In the code below, ...
ePoQ's user avatar
  • 631
0 votes
1 answer
572 views

Ordinary Kriging: "Warning message: In fit.variogram(data.var, vgm("Mat")) : No convergence after 200 iterations: try different initial values?"

I am trying to fit a variogram for kriging using the sp and gstat packages in r, but when I fit the variogram using a mattern fit, I get this warning message: Warning message: In fit.variogram(data....
s_o_c_account's user avatar
0 votes
1 answer
185 views

Error message with Krige function: Error in as.character.default(X[[i]], ...) : no method for coercing this S4 class to a vector

I am trying to run the Krige function but I keep receiving NA values for var1.pred and var1.var. After using the warning() command, it says: Error in as.character.default(X[[i]], ...) : no method for ...
Ric's user avatar
  • 1
1 vote
1 answer
491 views

R - Why are my kriged interpolation values so low when using ordinary kriging (gstat)?

I am using a synthetic dataset that I generated for the purposes of fulfilling an assignment. I am attempting to use ordinary kriging to interpolate point data across an entire field, but my ...
s_o_c_account's user avatar
1 vote
1 answer
475 views

Kriging with gstat package in R produces empty interpolation points

I have kriged a dataset with the gstat package in R, but it has produced an empty variable as a result. I have 1,167 measurement points within a field, and I am trying to interpolate them across 3,464 ...
ihb's user avatar
  • 513
0 votes
1 answer
193 views

Adding kriging results back to a GWR model in R?

How can I add the kriging results of a downscaling process back to a GWR model? Basically, I have 2 raster, 1 at 400m (let's call it x1) resolution and 1 at 100m resolution. I upscaled the latter to ...
Dolby's user avatar
  • 91
1 vote
1 answer
462 views

Export kriging plot as GeoTIFF

I have performed kriging and plotted it with ggplot, now I want to load the plot in QGIS. For that to work I need a GeoTIFF file of my plot. How do I convert my plot into a GeoTIFF file? EDIT: added ...
simonericmoon's user avatar
2 votes
1 answer
773 views

Fitting a variogram for Kriging in R

I want to fit a variogram of my data for kriging. Here is what I have so far: library(sp) library(rgdal) require(gstat) setwd("C:/Users/49151/Desktop") #import data data <- read.csv(&...
simonericmoon's user avatar
1 vote
1 answer
1k views

Plotting a heatmap of Kriging with coordinate in R

I performed Kriging in R. But I have trouble getting a plot of a colored heatmap showing the resulted interpolated area along with a lon/lat values at the side and on the button. Here is an example, ...
simonericmoon's user avatar
1 vote
0 answers
117 views

Why can't gstat::krige accept duplicate locations when universal kriging?

Let us create a simple simulation worthy of gstat::krige with universal kriging, in the language of linear mixed models, i.e.: Where X is a n x n_vars matrix of n_vars additional variables, betas is ...
Giora Simchoni's user avatar
0 votes
0 answers
506 views

Ordinary kriging is not working in QGIS 3.20 & SAGA-7.2.0

I am using below data for making kriging interpolation. structure(list(Serial = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 17L, 18L, 24L, 28L, 30L, 31L, 36L, 37L, 43L, 44L, 46L, ...
Kazi's user avatar
  • 151
1 vote
0 answers
184 views

NAN's in the kriging predictions in R

I am trying to perform the kriging prediction of my data. I follow a pretty standard process. Firstly, I prep a grid to which the kriging predictions are supposed to be inserted. I prep data that I ...
Petr's user avatar
  • 111
0 votes
0 answers
24 views

Warning message while kriging in R [duplicate]

krig_Gaussian<-krige(formula=(B)~1, locations=Amb_m, newdata=gd_m, model=model_Gaussian.variog_m) [using ordinary kriging] Warning messages: 1: In proj4string(d$data) : CRS object has comment, ...
Tom's user avatar
  • 1
1 vote
0 answers
180 views

Upper and lower bounds from gstat::krige() and gstat::idw()

Is it possible to obtain lower and upper bound values from a kriging estimation using gstat::krige() in the same way it can be obtained from a simple lm() model? The following lm() example comes from ...
hiperhiper's user avatar
3 votes
1 answer
1k views

How to create a grid to do kriging interpolation that correspond to areas in a map having actual observations?

I need to do kriging interpolation but wanted to have the interpolation in areas where I have actual data; not across the whole map. This is my example. Here is the base map (shp file in a .zip file): ...
Giuseppe Petri's user avatar
2 votes
1 answer
705 views

Why krige function return all NA's values for the prediction when trying to interpolate a variable?

I am trying to build a map with kriging interpolation for a variable. When running the krige function the return is all NA values and the kriged map plot only one value. I couldn't find out why and I ...
Giuseppe Petri's user avatar
0 votes
1 answer
449 views

0........0.kriging error messages, grid file problem ? (automap, gstat)

I am trying to conduct kriging of variable called percent in South Africa. head(LL12) Location Longitude Latitude percent 1 L1 16.48476 -28.60737 1.0000000 2 L3 16....
Maria Eugenia D'Amato's user avatar
3 votes
0 answers
750 views

Spatial interpolation of climate data using latitude, longitude and elevation in r

I have downloaded E-OBS gridded daily climate data on 0.1-degree grid. For each grid point, I have longitude, latitude, elevation and climate data, i.e. precipitation sum / mean temperature. Now, I ...
JerryTheForester's user avatar
0 votes
0 answers
803 views

Interpolating SpatialPointsDataFrame to RasterLayer using autoKrige in R

I have a SpatialPointsDataFrame with elevation data and 51'257 elements. I also have a RasterLayer object of dimensions c(114,210) covering roughly the same area (all the spatial points are within the ...
Abdirizak's user avatar
0 votes
1 answer
428 views

R function krige.cv() returns NAs

I recently completed a geostatistics course, and now trying to apply my knewly acquired knowledge to a real case. I have a dataset with 2 122 groundwater level measurement points. I would like to ...
ChloeG's user avatar
  • 776
1 vote
1 answer
1k views

Interpolating DEM using Kriging in R [closed]

I have several DEMs as geotiff files which I load into R using raster::raster. Now some of these DEMs contain patches of missing values, represented by NA. I would like to interpolate these missing ...
Abdirizak's user avatar
0 votes
1 answer
810 views

Latin Hypercube Sampling (LHS) in R

I am new to R and would like to generate Latin Hypercube samples (LHS) for three variables within the following limts: 1.25 ≤ x1 ≤ 5 , 1.25 ≤ x2 ≤ 5 7 ≤ x1 ≤ 25 with total 3*10 = 30 samples. What ...
Bineet's user avatar
  • 9
3 votes
1 answer
666 views

Variogram fit won't converge

I am having some difficulty fitting a variogram to the data provided at the end of this post. For context, this is baseball data where the x and z coordinates are for the location of the pitch and the ...
Remy's user avatar
  • 141
3 votes
0 answers
59 views

Performing meaningful kriging in R (averaging nearby points) [closed]

I have a set of data on the quantitative composition of the particle size distribution of the sedimentary layer. I have to build a map of the distribution of certain fractions across the entire study ...
Dmitrii Pantiukhin's user avatar
1 vote
0 answers
166 views

Raster distortion from parallel kriging in R

I am relatively new to parallel computing in R. I am using a high performance cluster to perform kriging for soil data points. I found this previous post which I used as a template: How to achieve ...
dtg37's user avatar
  • 133
3 votes
1 answer
2k views

R kriging raster returns NA for some prediction points?

I am trying to interpolate a raster layer of chlorophyll-a data using kriging (gstat::krige) in R, however the resulting interpolation is showing NA values in a peculiar straight line through the ...
JaimieC's user avatar
  • 31
0 votes
0 answers
110 views

Cokriging cross validation variances too small?

I'm looking into kriging the Meuse dataset in R. I first performed ordinary kriging using copper, using krige.cv to calculate residuals. The distribution of prediction variances given by applying ...
Ben Collister's user avatar
0 votes
1 answer
2k views

After I give kring command, this error comes up: data item in gstat object and newdata have different coordinate reference systems

> library(gstat) > library(readxl) > library(sp) > library(rgdal) #2013(FATALITIES) data <- read.csv("C:/Users/sbs/Desktop/Study/RA/Accident analysis/New folder/Iowa total crashes ...
Sudhanshu Tyagi's user avatar
2 votes
2 answers
952 views

Making data table using linear kriging interpolation with variogram in R

I have a table of data with such structure: longitude_for_data = c(32,68,89,145,176, -14, -42) latitude_for_data = c(22,98,21,13 , 16,-134,-102) Z_for_data = c(30,40,60,70 , 20, 40, 100)...
Владимир Кузовкин's user avatar
1 vote
1 answer
2k views

How kriging variance is calculated in R gstat?

How does exactly the krige function (a wrapper to gstat and predict functions) from package gstat calculate kriging variance (minimized estimation variance) in Ordinary Kriging? I wanted to reproduce ...
Andre Silva's user avatar
  • 10.3k
2 votes
0 answers
503 views

Error in Universal Kriging using gstat package in R [closed]

I am trying to perform universal kriging in R using the gstat package and running into the following error: krige(formula = CDD_LT_stC ~ Imperv1km + Elev_new, locations = sp.cal_data, newdata = sp....
Saad's user avatar
  • 21
1 vote
1 answer
266 views

Kriging for unevenly spaced points using R?

I started to read about Kriging and the implementation into R. In all the tutorials I found, a (regular) grid is used to do ordinary or universal kriging. My situation is as follows, I try to ...
Patrick Balada's user avatar
1 vote
1 answer
683 views

IDW/Kriging running slow in R

I have a dataset with 2157335 entries, and I am performing IDW/Kriging to interpolate. But the code is running very slow. I am not sure this is because of a large dataset or there is something wrong ...
XC1234's user avatar
  • 11
6 votes
1 answer
843 views

Cokriging: zero distance cross-semivariance in undersampled cases [gstat error]

Trying to cokrige two variables that are not perfectly colocated (one has sparser measurements than the other), I faced an issue that I'll illustrate with the following MRE. With the meuse dataset, ...
Yollanda Beetroot's user avatar
1 vote
1 answer
517 views

Calculating coefficient of variation from gstat output to create uncertainty map in R

I was asked by my supervisor to create uncertainty maps of kriging interpolation based on the coefficient of variation ((sd/mean)*100%). I used krige function from gstat package to perform the ...
Edelws's user avatar
  • 33
9 votes
1 answer
4k views

Kriging example with sf object

I am new to geo spacial analysis. I would like to learn kriging from a simple example. Say, we have four points with some z value. library(sf) library(gstat) library(tidyverse) dt<-tibble::...
Jacek Kotowski's user avatar
0 votes
1 answer
392 views

spatio temporal anisotropy in R: stAni argument in vgmST and krigeST

I have some problems in understanding the usage of argument 'stAni' of vgmST and krigeST functions, for the setting of spatio temporal anisotropy. How have I to interpret this argument, that is the ...
user7836391's user avatar
5 votes
1 answer
1k views

Preparing dataset to perform co-kriging in R gstat?

This is the first time I'm using co-kriging in gstat. My problem is that I'm not sure how to prepare the data frame to supply to co-kriging when the variable of interest and auxiliary variables are ...
rm167's user avatar
  • 489
-1 votes
1 answer
1k views

Performing Cokriging in R? [closed]

I would like to perform cokriging of 60 observed data points. In the shapefile, there are 60 fields containing the observations as Time 1 to Time 60. I also have 60 rasters in tiff format. I want to ...
user2543's user avatar
  • 1,188