66
votes
Accepted
GRASS not working with QGIS says This algorithm cannot be run
If I open QGIS with the shortcut "QGIS Desktop 3.6.0 with GRASS 7.6.0" everything works fine. If I open QGIS with the shortcut "QGIS Desktop 3.6.0" I get the same error as you.
...
57
votes
Setting all pixels with value <= 0 to "nodata" in DEM raster
It can be done in one step in QGIS in the raster calculator.
In QGIS3, for a raster layer named "x", use the following expression:
(("x">0)*"x") / (("x">0)*1 + ("x"<=0)*0)
This trick maps ...
30
votes
Generating equal sized polygons along line with PyQGIS
Interesting question! It's something I've wanted to try myself, so gave it a go.
You can do this in PostGRES/POSTGIS with a function which generates a set of polygons.
In my case, I have a table ...
24
votes
Splitting raster into smaller chunks using GDAL?
There's a bundled python script specifically for retiling rasters, gdal_retile:
gdal_retile.py [-v] [-co NAME=VALUE]* [-of out_format] [-ps pixelWidth pixelHeight]
[-overlap ...
21
votes
Setting all pixels with value <= 0 to "nodata" in DEM raster
You can also save the layer (right click, save as ...) and specify a nodata range. This will keep the original nodata and create new nodatas for the specified range of values.
20
votes
QGIS 2.14.1 LAStools install error: "wrong value for parameter 'Msys folder'..."
According to Diego Alonso's comments from the mappingGIS blog1, this error is related to QGIS version 2.14. With the upgrade, the standalone installer eliminated the msys folder from GRASS 7 ...
13
votes
Generating equal sized polygons along line with PyQGIS
@Steven Kays's answer in PyQGIS.
Just select the lines in your layer before running the script.
The script does not support the linemerging so it can not work on layer with multilinestring
#!python
# ...
12
votes
Choosing between QGIS and GRASS for simple thematic maps with different layers
What is not mentioned, yet:
QGIS and GRASS GIS - both can be run as a completely separate software
However, GRASS GIS algorithms are included in QGIS processing toolbox (can be excluded or included ...
11
votes
Generating equal sized polygons along line with PyQGIS
There is differents solutions. And this can work with simple polyline and multiple selected entities
block diagram:
Parameters
select orientation for generation and read index (left-to-right, north-...
10
votes
Accepted
How to clip raster in GRASS GIS?
For cropping a raster map according to a vector map, you can use r.mask which also supports vector maps.
Update 2018: Meanwhile there are v.clip and a new Addon available: r.clip
10
votes
Accepted
Lowering density of GRASS r.stream.extract result?
You need to adjust the "threshold" parameter, which is Minimum flow accumulation for streams in the Processing GUI. With this parameter you determine what is the minimum drainage area for each stream ...
10
votes
Accepted
GRASS GIS Plugin not loading in QGIS 3
Ok, this is slightly embarrassing but I'll post the answer here anyway in case someone is as blind as I was. Apparently, there are two QGIS executable files: C:\OSGeo4W64\bin\qgis-bin.exe and C:\...
9
votes
Finding vector line bearing in QGIS or GRASS
For the record - You can now do this easily with QGIS alone (since later QGIS versions): first use the "Explode lines" tool, yielding all line segments, then calculate azimuth with the Field ...
9
votes
Get drainage basin of a polygon (with QGIS, GRASS or other FOSS)
If you need only the total drainage area (not the actual geography of the area) then you can do this with flow accumulation. Run r.watershed with your DEM as input, and define a name for the flow ...
9
votes
Accepted
Cannot run Grass algorithms in QGIS 2.18 on Ubuntu 16.04
I get the same error with the Ubuntugis version of QGIS and GRASS version 7.2.0.
It seems that 7.2 is not yet correctly adopted in processing. There is already a ticket for it: https://hub.qgis.org/...
9
votes
Accepted
Enabling GRASS in Processing Toolbox of QGIS 3.28.2.0
Ok , I found it:
enable GRASS and GRASS Provider Plugin via the Plugin Menu
UPDATE: for the Processing Toolbox you only need the GRASS Provider Plugin
8
votes
Smoothing DEM using GRASS?
I used GIMP plugin wavelet noise reduction tool and I get good results and fast:
GIMP Plugin Wavelet noise reduction
8
votes
Splitting lines into equal segments with QGIS
The current version of QGIS (QGIS 3.0+) has the option to Force segments to be exactly of a given length, except for the last one using v.split. v.split is accessed from the Processing Toolbox under ...
8
votes
How do I count the number of vector lines that pass though a given raster cell?
Here's a Python solution that will run 100,000 simple linestrings in 56 seconds. My code could probably more efficient, but it's just a quick hack. This particular solution just generates n random ...
8
votes
Accepted
Brewing GRASS with PostgreSQL support?
When you look at the grass-70 recipe info from homebrew, you'll see:
Rainers-MacBook-Pro:~ rainerkrug$ brew info grass-70
osgeo/osgeo4mac/grass-70: stable 7.0.1
Geographic Resources Analysis Support ...
8
votes
Accepted
Basin creation GRASS vs. flow direction
The problem was the parameter "allow only horizontal and vertical flow of water".
I really don't know why this is set by default in QGIS/Processing!!! damn noob error!
8
votes
GRASS not working with QGIS says This algorithm cannot be run
I had the same problem but I managed to solve it by renaming my grass folder from "grass76" to grass-7.6.0".
8
votes
Accepted
Workflow to remove gaps between polygons
You can try:
Dissolve into one big polygon
Delete holes (called Cleaned in the screenshot)
Difference this and your polygon layer to create polygons where there were holes
Merge the hole polygons ...
8
votes
Accepted
How to if a polygon is within a concave area of another?
This could work but it depends on the shape of your polygons:
Convex hull the grey polygons
Difference output with grey polygons, to create bay polygons (orange in the screenshot)
Singlepart these to ...
7
votes
Grass GIS: Number of CPU cores to use
There are many approaches to parallelization. Some GRASS GIS modules are parallelized internally using OpenMP or pthreads when GRASS GIS is compiled in the way that these are supported. This applies ...
7
votes
Accepted
Least cost path between various points QGIS
Here is a script for GRASS GIS 7 I wrote for similar purpose. It takes as input map of vector points and uses r.walk to create cumulative cost surface and creates vector line (least cost path) between ...
7
votes
How can I calculate flow length in QGiS/GRASS?
The GRASS addon r.streams.distance is what you need. You add it to GRASS 7 using the g.extension module to install addons.
7
votes
Accepted
How can I add r.local.relief to the QGIS Processing Toolbox?
r.local.relief is an addon and not a standard Grass command. It is a Python script (r.local.relief.py) using grass.script, however it is not installed by default.
you need first to install the addon ...
7
votes
Accepted
Creating optimised path between nodes avoiding polygons entities using QGIS
Here is a...unique(??) way of doing it. I managed to create routes using QGIS 2.14 with GRASS and rasters. I got the idea from here. To summarize we will rasterize the land and sea, run a proximity ...
7
votes
QGIS 2.14.1 LAStools install error: "wrong value for parameter 'Msys folder'..."
2.18 user here - After many hours of trying to get the LAStools product functional I finally found this solution to the \msys error - namely to simply add the folder as suggested here - works BUT I ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
grass-gis × 2252qgis × 935
raster × 291
python × 190
qgis-processing × 101
vector × 91
r × 78
dem × 75
saga × 75
gdal × 72
grass-7.0 × 70
grass.script × 70
pyqgis × 65
network × 53
qgis-3 × 52
qgis-plugins × 51
qgis-grass-plugin × 49
error × 48
installation × 46
distance × 43
coordinate-system × 40
add-ons × 39
qgis-2 × 37
topology × 37
watershed × 36