Hot answers tagged

4

I dont know why your attempt does not work. But you should be able to fix it with a more manual approach: Fix the holes: Dissolve Delete holes Difference with your start layer as input layer, and dissolved layer as overlay. Now you have the holes as small polygons Merge these with the input layer Select them by area and Eliminate Self intersections: Union ...


3

Here is how GRASS should be imported (because of a bug it does not work, see more here, thanks Andrea Giudiceandrea): import sys import qgis.core OSGeo_folder = r'C:\OSGeo4W' sys.path.append(fr'{OSGeo_folder}\apps\qgis\python\plugins') import processing from grassprovider.Grass7AlgorithmProvider import Grass7AlgorithmProvider processing.core.Processing....


3

I do not have 3.22 installed yet, so not tested in that version. I have tested this with 3.20.3 installed with the new OSGeo4W installer. If it doesn't work for you I will delete this answer. Tested workflow is: Save the following batch file (e.g. pyqgis_grass78.bat): @echo off SET OSGEO4W_ROOT=C:\OSGeo4W call "%OSGEO4W_ROOT%"\bin\o4w_env.bat call &...


3

It is all about definitions. If you assume that your peak is any cell, that is higher than 8 of its neighbors, you'll pick any tiny bump in your terrain: However if definition is any cell that is highest for neighborhood square 101*101, you'll get this: To locate mountain passes you'll need to isolate ridges first. Picture below shows divides between ...


2

After a very frustrating afternoon with a colleague, we figured it out. The reason it had always worked before this is because all my code was previously configured to work on a local Postgres instance. (i.e. on localhost). My explanation here is based on what appears to have happened, I am not an expert on the inner workings on GRASS and my brain feels like ...


1

You can run Clip and Difference tools from Menu Vector / Geoprocessing tools. The advantage of this tools is that a polygon of the input layer that gets split into several parts will still be one multipart feature as you can see on the screenshot (red arrows, selected one feature "forest inside a parcel" (right) and one "non-forested part of ...


1

The LS-factor is an important variable to estimate average erosion - annual soil loss (as in RUSLE), and based on experimental data. It becomes greater when the slope is steeper and the effective slope length is shorter. Slope length is the horizontal distance from the ridge to the point where deposition starts to occur. At a given cell, the length to the ...


1

Following the "Working with GRASS without starting it explicity" that you linked to in your question, you need to set several variables in advance, before calling from grass.script import core as gcore: # DATA # Here set your path to grassdata (GRASS GIS database) directory # Probably : gisdb = os.path.join(os.path.expanduser("~"), "...


1

I found this file in /usr/local/lib/ and added that to the LD_LIBRARY_PATH env. variable. It was not in the folder /usr/lib64/ along with other .so files. This allowed me to install GRASS with no errors


1

Not sure it has entirely fixed it, but in the end I just ran ./configure to ignore various settings so that they no longer became an issue: CFLAGS="-g -Wall" ./configure --with-tiff=no --with-png=no --with-sqlite=no --with-opengl=no --with-fftw=no --with-cairo=no --with-freetype=no


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