5

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 function is gdal.Grid(destName, srcDS, **kwargs). You can see some examples of how it's used in test_gdal_grid_lib.py (from the test suite). Or a made-up example:...


3

Yes, gstat::idw can predict at any x,y location, but if you want to show that as a continuous map then you need a raster. The example does: # Interpolate the grid cells using a power value of 2 (idp=2.0) P.idw <- gstat::idw(Precip_in ~ 1, P, newdata=grd, idp=2.0) to predict at a regular grid of x,y coordinates generated by spsample It then converts the ...


3

Taking a look at the Kriging tool's documentation I see that "ORDINARY" is not an option for the semi-variogram type in the KrigingModelOrdinary class. SPHERICAL — Spherical semivariogram model. This is the default. CIRCULAR — Circular semivariogram model. EXPONENTIAL — Exponential semivariogram model. GAUSSIAN — Gaussian (or normal distribution) ...


3

This is actually pretty easy. Have a look at https://shapely.readthedocs.io/en/stable/manual.html#object.interpolate Sample code: distance = 0 ## starting at length 0 add_distance = 10 ## eg interpoalte every 10 meter while distance < line.length: new_point = line.interpolate(distance) distance += add_distance ## add more You will have to ...


3

You're very close. Now, you just need to rotate your points in the inner for loop. To know how many degrees, get these 2 angles: # Before the for loops n_p_angle = river_geom.interpolateAngle(river_geom.lineLocatePoint(nearest_point)) # Inside the outer for loop a = river_geom.interpolateAngle(i) Now, make sure you import the module math and after the ...


3

The following minimal example is in a somewhat similar format to the post you linked to which should work for QGIS 3: # Interpolate points using QgsTinInterpolator pathToFile = "path/to/input.shp" layer = QgsVectorLayer(pathToFile, 'input','ogr') layer_data = QgsInterpolator.LayerData() layer_data.source = layer layer_data.zCoordInterpolation = False index ...


2

I would like to suggest Multileve B-spline Interpolation tool in Processing Toolbox > SAGA > Raster creation tools.


2

It is a bad idea to measure distances in lat-long, as a degree of longitude is not the same ground length (in meters) as a degree of latitude. The linestring has 3 points that are not aligned. The first (top) half of the linestring vary a bit in longitude and a lot in latitude. The second (bottom) half of the linestring vary much more in longitude than in ...


2

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(function(image){ var currentDate = ee.Date(image.get('system:time_start')); var meanImage = composites.filterDate( currentDate.advance(-2, '...


2

The final problem were different CRS. The points were in 4326 and my Project layer in 25832. I changed everything to the same CRS and it worked. Thanks for the help.


2

In some sectors of the coastline, the vertices are far apart from each other, so the triangulation finds triangles that cross over the coastline. Densify by count the coastline. Add only one point for each segment. Extract the vertices and interpolate again. If it is not enough, densify it again by adding one more point per segment. In TIN ...


2

however might it be fixed by adding a larger buffer (currently using 100m)? What is the size of the chunk? How is it possible that you don't have ground points with a 100 m buffer? Are you sure your point cloud is classified? Is it a particularly small chunk at the edge of the dataset? I can't answer without more information. If it can't be remedied, ...


1

First check in the layer properties and check the fields tab. Make sure that the field that you want to interpolate is not an integer64 one. The interpolation field can be a decimal number (real) or an integer with a width less than ten characters. It seems that the interpolation plugin can not understand integer64 fields. If interpolation field is an ...


1

TLDR; Yes, use the Barnes Surface or Heat Map vector-to-raster processes, but it is a bad idea to do this. Unless, you really want to generate a different map with every request (and why would you want to do that?) then this is a bad idea as edge effects and slight differences in bounding boxes will lead to strange effects. For example, here is a tiled heat ...


1

If you have access to an Advanced license, you could: convert polyline's vertices to points with Feature Vertices To Points open the Attribute table of the point feature created in step 1, add a new field called something like "Z_coord" and Calculate Geometry choosing "Z coordinates" use the Point to Raster choosing the field created in step 2 as ...


1

After doing some research I found a potential solution using R's smoothr package. The smoothing spline function creates a smooth line feature that intersects all the original vertices from the input linestring. Here's the code: library(sf) library(RPostgreSQL) library(rpostgis) library(smoothr) #connection to my postgis database con <- dbConnect('...


1

I have a few thoughts that hopefully will assist you: First, the fine print... I don't have any experience converting LAS to DEM, but I do have a fair amount of elevation change detection with LAS-derived DEMs. Specific to the striping that you mentioned... as a US President once said, "I feel your pain!". In my experience striping (sometimes seen in DEM-...


1

You are over complicating this a bit. Certain types of data are suitable for interpolation whereas other data is more well-suited for simple binning. In the lidar realm, elevation and intensity are commonly interpolated but, other lidar attributes (class, return number, time-stamp, strip-id) are simply binned to a pre-existing grid. From an analytic ...


1

Linear Regression: a + b * x a + b * x + c * x^2 a + b * x + c * x^2 + d * x^3 a + b * x + c * x^2 + d * x^3 + e * x^4 Logarithmic Model: a + b * ln(x) Power Model: a + b * x^c Gaussian Model: a + b * (1 – exp(-(x /b)^2)) Spherical Model: a + b * ifelse(x > c, 1, 1.5 * x / c - 0.5 * x^3 / c^3) I don't know a + b * sqrt(x).


1

I think you could use Traja library (https://traja.readthedocs.io/en/latest/rediscretize.html) to resample your own data into the constant time interval that you want.


1

Suppose your regression model is of type Y = b0 + b1*X + e. Interpolate the explanatory variable (X) to the area of interest (AOI). This means to fill in the empty 100m X 100m grid. Which method/tool to pick up for this depends on the analysis. Use tool raster calculator to create a new raster with values for the response variable Y in the AOI based on the ...


1

The saga algorithm is a raster creation tool, so the result is a raster. you can use polygonize with the result to get a vector layer. the edges are not intepolated due to the distribution of your points. see en.wikipedia.org/wiki/Bicubic_interpolation for more information


1

You need to clean up your data prior to loading it into QGIS. I would do this either by removing the data points by giving them a specific value (either something negative (e.g. -9999) and set QGIS to remove them when running your IDW or an amouint agreed upon for describing a trace amount (e.g. 0.5)). QGIS needs to know how you want to treat these values ...


1

At this point dat isn't a spatial object, so when predict refers back to it it can't get any spatial data: idw_ff = gstat(formula = ff ~ 1, data = dat, nmax = neighbors, set = list(idp = beta)) make it spatial: coordinates(dat)=~dist+rel_alt and it works. idw_ff = gstat(formula = ff ~ 1, ...


1

Not sure why you called it tin_interpolator when you want to use QgsIDWInterpolator :) But you need to replace the following lines: layer_data.SourceType =SourcePoints to layer_data.sourceType = QgsInterpolator.SourcePoints layer_data.distanceCoefficient=2 to tin_interpolator.setDistanceCoefficient(2) cos= canvas.extent() to cos = iface.mapCanvas()....


1

if you need the class proportions, you could use those steps: 1) reclassify your DEM into categories (using the reclassify tool) 2) use tabulate area to have the count of pixels of each category inside each polygon Warning: in case of large area, the default size of the pixel in the analysis (there is an internal conversion of the feature class into ...


1

I figured it out. You can see the attribute table below. Before, I was adding 3 different shape files to add 3 locations. After I did the same thing with only one shape file (and three different locations [points]) it worked. I also had to remove the Type (text) column, otherwise it didn't work again.


1

I continue with going through the code and it is not a bug but change in the API (and mainly my fault) which leads to the problems with triangulation. In python there is zCoordInterpolation = False property but in the new API there is an enumeration so instead of ValueZ (which I wrongly set up) you need set up the different value from enumeration (of ...


1

You can use Add Polygon Attributes to points tool under SAGA which will transfer the land cover field from the polygon attribute table to the points attribute table. The tool is located under Processing toolbox -> SAGA -> Vector Points tools -> Add Polygon Attributes to points: Make sure that both vector files have the same CRS. Another option is ...


1

Select by attribute all urban areas from the landcover layer and export them to a new layer. Then select by position all buffers which intersect with the newly exported layer. Export the selected features to a new layer.


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