17 votes
Accepted

R gstat krige() - Covariance matrix singular at location [5.88,47.4,0]: skipping

This error is commonly returned because you have duplicate locations. You can check this using the sp::zerodist function. To remove duplicate locations you call sp::zerodist within a bracket index. ...
user avatar
16 votes

Plotting map resulted from kriging in R

In order to interpolate prices with kriging you first need to convert your geographic coordinates to projected coordinates. Assuming you have them, below there is a reproducible example, showing a way ...
user avatar
  • 9,901
10 votes
Accepted

Performing Kriging in QGIS

The great thing about QGIS is its modular design, based on which you can use the geoprocessing engines of various other systems directly as tools in QGIS (GRASS, SAGA, GDAL, OGR, ...). In order to do ...
user avatar
10 votes

Which interpolation technique is suitable for a bathymetry of a small lake?

One alternative is spline interpolation as suggested in the related post: Interpolation of multibeam bathymetry. From QGIS, use the GRASS tool v.surf.rst: Performs surface interpolation from ...
user avatar
  • 9,901
9 votes
Accepted

Strange spatial interpolation results from ordinary kriging

In a nutshell, the problem lies in a mismatch between data behavior and some (strong) assumptions you are implicitly making. Diagnosis The strongest of these is that the data are one realization of a ...
user avatar
  • 67.7k
9 votes
Accepted

Improve performance of a PostGIS st_dwithin query

The explain doesn't show an index coming into play, which could be for two reasons: You don't have one. So make one with CREATE INDEX tree_gix ON trees USING GIST (geom) Your data is in geographic ...
user avatar
  • 19.4k
9 votes
Accepted

QGIS: what is the difference between heatmaps and interpolation plugins?

Heatmaps and interpolations are completely different things though they might look similar. A heatmap visualizes "hotspots" in the distribution of features on the map i.e. dense areas will be ...
user avatar
  • 902
8 votes

Performing Spline interpolation on GPS Track

Try using v.generalize tool from the Processing Toolbox. There are a number of algorithms in there that can generalize a line nicely. Another possible solution could be the "Generalizer" ...
user avatar
8 votes

Downscaling raster images in Google Earth Engine?

You can control the pixel size of an image by setting the scale parameter of ee.Image.reproject(): // Reference a Landsat scene. var image_30m = ee.Image('LANDSAT/LC08/C01/T1/LC08_044034_20170614'); ...
user avatar
8 votes
Accepted

How to use GDALGridInverseDistanceToAPower in a python script

Yes, you can call this from a Python script. But you don't directly call the low-level C API. First, take a look at the GDAL Grid Tutorial for background info. From the Python library, the relevant ...
user avatar
  • 39.9k
8 votes
Accepted

Replica of point layer data from attribute value in QGIS

The following script does the job: layer = QgsProject.instance().mapLayersByName('Layer_Name')[0] name_field = 'Name' # not mandatory count_field = 'Count' # numerical field, mandatory # make new ...
user avatar
7 votes

Mapping Precipitation Data

What you need to do to create a continuous surface representing precipitation is a process called interpolation. ArcMap has a number of tools to do this, based on a variety of statistical and sampling ...
user avatar
  • 8,926
7 votes

Interpolate data from multiple gpx tracks

Yes, there are such algorithms (see for example here, there and here) but since you seem to have only one single road, would it not be easier to do it by hand? (!). Using for example QGIS, you could ...
user avatar
  • 9,947
7 votes

Extracting raster values with polylines in QGIS

This is a bit of a late answer, but I thought it was worth contributing. As a polyline is just a series of points you should be able to obtain the Mean value you want by converting the Polyline nodes ...
user avatar
  • 81
7 votes

Repeating steps based on different field using ModelBuilder?

There is not an Iterate Fields tool in ModelBuilder. I can think of two possible workarounds: Modify the model to run as a Python script. Define a list of the fields you want to use, and define a ...
user avatar
  • 8,926
7 votes
Accepted

Interpolating degree data using QGIS?

Interpolate the sine and cosine of the angle, and then convert back to an angle with the atan function. These functions are available in QGIS' expression engine. There is an atan2(dy,dx) function like ...
user avatar
  • 52.1k
7 votes
Accepted

How to calculate kriging weights?

Is it true that we're just using a different set of weight values than the 1/distance in IDW? Yes, both IDW interpolation and Ordinary Kriging (OK) will calculate weights based on distance, but with ...
user avatar
  • 9,901
7 votes

Interpolate smoothly nodata values in QGIS

I got curious and tried the different fill nodata functions. As you can see the regular SAGA Close Gaps produced the least anomalies. It also took the longest.
user avatar
  • 2,009
6 votes
Accepted

Spatial interpolation of 30 weather stations to other areas

You can likely get a reasonable interpolation using a linear regression (assuming your 30 weather stations are a representative sample) using elevation, latitude and distance from the coast as ...
user avatar
  • 52.8k
6 votes
Accepted

Raster interpolation with gdalwarp, and replicating with python API

You have now a better way to do. Since RFC 59.1 : GDAL/OGR utilities as a library, you can use gdalwarp from Python directly without using any call to the command line utility but using really the ...
user avatar
  • 28.7k
6 votes

Weird output when projecting/interpolating points on lines

I think you have a problem with your points shapefile and/or the projections (lines and points). These commands are those of Shapely used by GeoPandas From Coordinate of the closest point on a line ...
user avatar
  • 51.2k
6 votes

TIN Interpolation plugin in QGIS 3.0

According to the changelog, the TIN interpolation plugin has been removed, as it is now part or QGIS core. To find it in Qgis 3.0, open the processing toolbox and search for Interpolation -> TIN ...
user avatar
  • 1,831
6 votes
Accepted

Smoothing/interpolating across images in an ImageCollection to remove missing data

You can replace the values using where(). // Replace masked pixels by the mean of the previous and next months // (otherwise, how to deal with the first images??) var replacedVals = composites.map(...
user avatar
  • 9,298
6 votes

PostGIS: Interpolate/Cluster geographic points to average points

A solution using PostGIS alone. The Steps are as follows: Generate clusters from the points Get the centre of each point cluster Generate a line that connects each cluster centre point (will also ...
user avatar
  • 1,738
5 votes
Accepted

"Topo to Raster" tool for QGIS?

No there isn't a QGIS analogue to TopoToRaster (actually ANUDEM)*. There isn't an analogue anywhere else that I'm aware of either for that matter.** (If you know of others please chime in.) In brief ...
user avatar
  • 27.6k
5 votes

What resampling technique should be used when projecting aerial photos?

I know that this question is rather old, but I wanted to add my 2 cents, in case others come across this thread trying to answer the same question... The previous answers are correct when you truly ...
user avatar
5 votes
Accepted

Spatio-temporal block kriging with R package gstat?

In sp, SpatialPoints*, SpatialPixels* and SpatialGrid* (with * omitted or replaced by DataFrame) do support more than 2 spatial dimensions, as OP has done, but SpatialPolygons* and SpatialLines* do ...
user avatar
5 votes
Accepted

Cross-validation of TPS and kriging outputs from the fields package in R

If you are just after a metric of performance, this is a fairly straight forward type of analysis to specify. 1) specify a model, 2) predict the model(s) at the data, 3) apply an accuracy/performance ...
user avatar
5 votes
Accepted

How to interpolate population data?

The short answer is: no, but it might be the best you can do without additional layers. The problem is that humans do not settle evenly. If all you have is populations of cities then IDW might be your ...
user avatar
  • 982

Only top scored, non community-wiki answers of a minimum length are eligible