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 ...
3
votes
Accepted
why is my input-Pixel in "r.resamp.filter" not always the center-pixel of the output?
I redid your procedure, but setting the region to integer values:
micha@RMS:~$ g.proj -p
-PROJ_INFO-------------------------------------------------
name : CH1903+ / LV95
datum : ch1903
...
3
votes
GRASS i.rotate function not appearing - any idea's why?
THe i.rotate module is still quite available as a GRASS addon: . In general, addons are not immediately accessible in the QGIS processing toolbox. I suggest you run GRASS itself, independent of QGIS, ...
3
votes
An example for Viewshed analysis in Python
The Python API documentation for the ViewshedGenerate algorithm is at https://gdal.org/api/python/osgeo.gdal.html#osgeo.gdal.ViewshedGenerate
osgeo.gdal.ViewshedGenerate(Band srcBand, char const * ...
2
votes
Create a location for GRASS GIS command without GUI is not understood by GRASS from bash
Creating a LOCATION is more than just the directory. That directory must contain certain files, created by GRASS that determine the coordinate reference system, computational region, etc. You can ...
2
votes
Accepted
Problem running QGIS r.horizon command in PowerShell
The directory "C:\Program Files\QGIS 3.28.2\bin" is already in the PATH enviroment variable, so there is no need to add it again.
I am not very good at executing commands in the Windows ...
2
votes
Miminum values of a raster change when applying r.resample
There may be no zeros in your data set. When I load the raster into GRASS, I get the message 90 degree south is exceeded by 0.0166667 cells. See link for a possible work-around. When I load it into R, ...
2
votes
Accepted
Missing tool `i.points.auto` in the QGIS GRASS provider
i.points.auto: is a plugin and it's not part of the GRASS core. It must be installed separately.
More info here:
https://grass.osgeo.org/grass83/manuals/addons/
Thanks to user2856 for the ...
2
votes
Errors building GRASS
I simply had to upgrade flex to version 2.6.4. Now grass-8.3.0 compiles perfectly.
1
vote
R.regression.multi land-use data not enough valid cells
I downloaded the data layers from the links you supplied. First, the cov_all are single band rasters with values from 1-21 (I assume land cover classes). And they are already projected in EPSG:3035. ...
1
vote
Why stream numbers generated by r.stream.order go one after other, not succeeding
The r.watershed has the added feature that it can produce "half basins" (each basin split in the middle by the enclosed drainage line). This is what causes even numbering of cat values for ...
1
vote
Accepted
Creating relation for duplicate lines
Extract the duplicate features to a new (temporary) layer using "Extract by expression" with the expression overlay_equals(@layer)
Run "Join attributes by location" using your ...
1
vote
GRASS build polylines based on category/ID (v.net.distance)
Solution here is to use the v.net.distance -l flag:
Write each output path as one line, not as original input segments.
1
vote
Accepted
Running GRASS GIS from PyCharm
I suggest to try the instructions for PyCharm on the GRASS wiki:
https://grasswiki.osgeo.org/wiki/Tools_for_Python_programming#PyCharm_IDE
1
vote
Accepted
Getting errors on startup of GRASS
Check what's going on in the Data pane (should be on the top left). Perhaps you switched your current project (location). If you want to see the world map again, try to find project ...
1
vote
Accepted
QGIS Raster resampling without label changes
Change the resampling method from the default average to something that doesn't return a floating point value like min, max or mode.
1
vote
How to get centerline of the mask images
Since your first tag is grass-gis, I suggest you try the GRASS module v.centerline. You'll have to perform the following steps:
convert the raster to a polygon vector (r.to.vect)
extract the boundary ...
1
vote
Accepted
Access Terminal Commands with QGIS
Yes this is possible. I have exact same scenario as you and wanted to achieve the same thing. (Worth noting im on a windows machine, running OSGEO installation of QGIS).
You will need to know the path ...
1
vote
Accepted
Calculating flow path length in R
You can use the R package {whitebox} to bring whitebox tools to your R session. The tool you might be looking for is called wbt_downslope_distance_to_stream. Below you will find an example how to ...
1
vote
Accepted
Check if a file exists in a GRASS mapset
This seems to work for me, using the bash if [ -z $variable ]; then... form:
(I have a raster named 'cov')
eval `g.findfile element=cell file=cov`
echo $name
cov
if [ -z ${name} ]; then echo "...
1
vote
Calculating percentage of small grids in coarse grid (fill ratio)
Here's how you can calculate the percent of high resolution cells with some value contained within each low resolution cell. For this example I took an elevation DEM at 1 arcsecond resolution (about ...
1
vote
How to use v.net.path algorithm on QGIS?
The start/end points is a simple text file with rows for each pair of start/end points. As in the GRASS GIS documentation (that you linked to):
The syntax is as follows:
id start_point_category ...
1
vote
How to interpret the numbers in the left column?
From your question, it seems you are dealing with a categorical raster. In GRASS GIS you can get and set the labels of categories using the r.category module. You can not "convert numbers to ...
1
vote
Accepted
Looping GRASS "v.extract" in python
If you prepare your where clause first, it should work (I use f-strings below):
Edited
Sorry for the mistake. If you enclose the where clause in double quotes, it should work. (tested here, this time)....
1
vote
Delineating large scale watershed?
For those reading this post in 2023, there is a free online tool that can quickly delineate large watersheds using high-resolution data from MERIT-Hydro and MERIT-Basins:
Global Watersheds Web App: ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
grass-gis × 2248qgis × 933
raster × 291
python × 191
qgis-processing × 101
vector × 91
r × 78
dem × 75
saga × 75
gdal × 71
grass-7.0 × 70
grass.script × 70
pyqgis × 64
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