New answers tagged

0

Concerning to the code (https://github.com/OSGeo/grass/blob/master/raster/r.watershed/seg/sg_factor.c#L68), the GUI gets the MDE in SI units and converts them to USA feet units: int sg_factor(void) { int r, c; CELL low_elev, hih_elev; double height, length, S, sin_theta; WAT_ALT wa; ASP_FLAG af; G_message(_("SECTION 5: RUSLE LS and/...


1

I know this is an old question but a new plugin has been created to take care of this issue. https://plugins.qgis.org/plugins/polystrip/ I am not the creator and do not take credit for the plugin.


0

You may first run r.clump to generate a map of individual parcel IDs. Then r.stats.zonal, using that new map as cover map to perform the zonal statistics or r.report.


0

You can take a look at existing Python code in the main GRASS GIS repository, for example here: https://github.com/OSGeo/grass/blob/master/scripts/r.reclass.area/r.reclass.area.py#L139 Here, the output of one command is used to generate the rules file.


1

you should downloading QGIS, as it is nowadays coming with GRASS inbuilt in it as a pugin. QGIS is capable of handling all layer vector layers with shapefiles.


0

Building on @Micha's answer, I was able to get this to work within the QGIS GIU with a careful stacking of Grass r.neighbors processing runs. In the below, 1418r is my base classification raster, but (as per Micha's suggestion) reclassified so higher-numbered classes are the ones that should "win". Upsample each cell to 4x4 by Exporting as with 4x the ...


1

I would approach this problem using r.neighbors. This module assigns each pixel a value depending on values in some window around the pixel. By using method=maximum you can achieve what you refer to as smoothing. You would first have to assign values to each vegetation type such that the higher values "win" over neighboring vegetation types. In you example ...


1

You can use v.to.db for this (see also keyword index, under "compactness"). Beforehand you need to vectorize your raster map with r.to.vect.


2

As the saying goes: "There's more than one way to cook an egg" Have a look at r.series. This module allows to combine a series of raster maps in many ways, including applying a list of weights. i.e. (assuming a linux bash command shell: MAP_LIST=`g.list type=rast pattern=map*` WEIGHTS="0.1,0.2,0.9,0.5" r.series input=$MAP_LIST method=sum weights=$WEIGHTS ...


1

I would point out that GRASS has a special module for dealing with null values: r.null. You could set your null pixels to zero by running: r.null map1 null=0


0

From the following documentation: https://grass.osgeo.org/grass78/manuals/r.mapcalc.html. The function isnull() returns 1 if its argument is NULL and 0 otherwise if(x,a) returns: NULL if x is NULL; a if x is non-zero; 0 otherwise if(x,a,b) returns: NULL if x is NULL; a if x is non-zero; b otherwise If the value of the pixel in map1 is ...


1

(map1 * weight1) + (map2 * weight2) works!


0

Generally speaking GRASS 7.6 Windows Addons are still not operational (in the term of daily builds), last build dates back to Sep 2019. Consider switching to GRASS 7.8 or wait for 7.6.2. Now back to your question, I tested r.stream.distance on my Windows 10 machine and it worked (I was able to install r.stream.distance in GRASS 7.6.1 and open GUI dialog). ...


0

I've seen this is recent versions of QGIS. In order to get the GRASS data to appear you need to do two things: Zoom to the layer, and apply some symbology. It seems that GRASS layers do not have any default symbology, so nothing is shown on the canvas. So right click on the GRASS layer and choose zoom to layer. Then right click again to open properties, ...


1

The red polygon is your current GRASS region. To see your data you have to load them first to the map canvas: In the left panel Browser you see the list of available layers, right-click on any layer and select Load layer.


0

How about using a combination of DEM raster and infrastructure vector data, then using "sink fill" to simulate different flooding scenarios such as: https://gracilis.carleton.ca/CUOSGwiki/index.php/Flood_Risk_Assessment_in_QGIS You can download the bathymetry data from this site if you need: https://download.gebco.net/


2

Did you install everything cleanly using OSGEO4W? This module is also on my QGIS but the executable is present in the GRASS folder of QGIS. C:\Program Files\QGIS 3.4\apps\grass76\bin You could try using the command line executable. The syntax is as follows: https://grass.osgeo.org/grass76/manuals/i.ortho.rectify.html


Top 50 recent answers are included