Hot answers tagged

5

It is possible if you convert your raster to a vector layer. Quick example, starting from this classification raster: Use Raster > Conversion > Polygonize to convert it to a vector layer: If you want to create points over a whole class (and not over each separate "patch"), use the Vector > Geometry Tools > Singleparts to Multiparts tool. ...


2

The raster= parameter of g.region needs to be a GRASS raster, not a tif file. You need to first import the tif into GRASS with r.in.gdal. You can import the tif, and set the region to match the new raster in one go with the -e option to r.in.gdal like: r.in.gdal -e input="C:\Users\rit\Documents\PhD\Projects\Intensity\input\2008_cdls\MI\...


2

The image should be 1 bit/pixel (0/1 values doesn't guarantee that). Use gdal_translate to change (tiff or png format will fit). gdal_translate -co "NBITS=1" image.tif bit_image.tif Change the background color to null r.null map=image setnull=1 After r.thin should work.


2

I use this export GISBASE="path_to_your GISBASE" export PYTHONPATH="${PYTHONPATH}:$GISBASE/etc/python/" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GISBASE/lib" export GIS_LOCK=$$ export GISRC="/path_to/.grass7/rc" Then with Python import grass.script.setup as gsetup gisbase = os.environ['GISBASE'] gisdb="path_to_your_GISDBASE" location="Geol" mapset="test"...


2

In GRASS GIS 7, there are two v.kernel tools: v.kernel.rast and v.kernel.vector. These tools are available in the current development version of QGIS. (QGIS 2.14.2 contains fewer algorithms and v.kernel is missing.) In the provider settings, the "GRASS commands" section is used to configure GRASS GIS 6 and the "GRASS GIS 7 commands" section GRASS GIS 7. ...


2

I use the following procedure with great success. Open "Processing" toolbox inside QGIS, click on "SAGA", click on "Raster creation tools", and finally click on "Triangulation". In the "triangulation" dialog box, select the shape file that has the data points used to create the contour. Choose the attribute field that has the elevation data, specify the ...


1

Have you used the Advanced Install option in OSGeo4W to make sure msys and GRASS 7 are both installed? I usually run the express install first, then go back into Setup, tick over to Advanced Install, and grab any extra bits and pieces I like to use. My GRASS 7 path is C:\OSGeo4W64\apps\grass\grass-7.0.4 GRASS 7 commands work for me but not GRASS ...


1

r.watershed doesn't require filling depressions, because it uses least cost path for routing. Try -b flag (Flow direction in flat areas is modified to look prettier).


1

The Python version of GRASS GIS is 2.7.x and not 3.x In Python 2.7.11 (Mac OS X) import grass.script.core core.__file__ '/Applications/GRASS-7.0.app/Contents/MacOS/etc/python/grass/script/core.pyc In Python 3.5.1 import grass.script.core Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Applications/GRASS-7....


1

It's not an operation system issue, but a QGIS installation one. There's no MSYS folder with the 2.14 standalone installer. Either follow the tips in the question and answers at QGIS 2.14 standalone GRASS provider missing Msys folder, can't execute tools, or perform an advanced install of 2.14, which does come with MSYS (verified so yesterday).


1

I think you need to install GRASS 6 on your system to include Minimal System (MSYS) because GRASS 7 doesn't include MSYS. The GRASS 7 tools keep looking for MSYS which is not exist. After installation, if you still receive the same error, then you need to set the correct path of the folder where MSYS is installed from Processing Options.


1

Patch (merge) the two vector maps together (I'm using roadsmajor and streams from the North Carolina sample dataset for GRASS GIS): v.patch input=roadsmajor,streams output=roads_and_streams Export using GDAL/OGR: v.out.ogr input=roads_and_streams format=DXF output=roads_and_streams1.dxf Alternatively, export using specialized module: v.out.dxf i=...


1

The fact that the range is NAN is no good as it means: no data there :) In GRASS GIS, the concept of computational region applies, i.e. in computations, raster input maps are automatically cropped/padded and rescaled (using nearest neighbour resampling) to match the actual computational region (bounding box and current raster resolution) in order to produce ...


1

GRASS numbers the directions in a drainage (flow direction) raster from 1-8 starting eastward and going counter clock-wise. What about the negative numbers? GRASS uses negative direction to indicate that the flow from this cell is going off the map. But the absolute value still indicates the direction. So both 4 and -4 mean west. Also, GRASS uses 0 to ...



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