Questions tagged [grass.script]

The Python scripting library for GRASS

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
39 views

CalledModuleError: Module run None g.gisenv -n ended with error

I am trying to use r.horizon GRASS module(version GRASS 7.8) in Python script. But I couldn't able to access the grass modules. Everytime, I am getting the following error. File "C:\OSGEO4~1\apps\...
3
votes
0answers
173 views

Extract representative slope profiles from hillslope polygons

With the help of the Whitebox Geospatial Analysis Tools I was able to easily extract hill slopes from a river network in combination with a flow direction map. Now I would like to extract ...
2
votes
0answers
33 views

GRASS GIS: r.out.gdal raises an exception and hangs if it's called multiple consecutive times

I'm using a small python routine (grass.script, pygrass) to handle several operations on sentinel2 imagery. I'm calling r.out.gdal inside the script and a very annoying problem occurs: when it is ...
2
votes
0answers
194 views

GRASS GIS: how to run g.run_command(“v.extract”) in Python with sqlite, smooth-spline in GRASS GIS?

I would like to solve several problems by using a python script in GRASS GIS: I already uploaded collected GPS-waypoints and tracks ("v.in.org"), patched several GPS-vector data ("v.patch") and ...
1
vote
1answer
68 views

Creating cumulative friction map

I am looking at bottom friction (Manning's n) values in relation to storm surge as large volumes of water flow over a surface. In order to calculate total head loss occurring as water passes from the ...
1
vote
0answers
126 views

GRASS r.sun returns “ERROR: insol_time and incidout are incompatible options”

I'm trying to measure irradiance on a DEM using the r.sun tool in QGIS 3.6. I have grids for the elevation (EPSG:32735 - WGS 84 / UTM zone 35S), the slope and aspect (EPSG:4326 - WGS 84). I've tried ...
1
vote
0answers
53 views

GRASS GIS Error Flags

I am attempting to run a GRASS command from the terminal and eventually a bash script, in which it links rasters in a folder to the Mapset previously defined. I was able to successfully create the ...
1
vote
0answers
32 views

(d.*) of GRASS GIS does not execute from standalone script

I am in windows 10. All my module import works well and grass env for standalone script is fine. I tried to execute following commands from standalone script. Neither wx1 display gets executed nor it ...
1
vote
0answers
454 views

Use Function V.clean of the grass tool in a Python script

I need to integrate V.clean functionality of Grass in a script python. this functionnality is accessible in Qgis (Processing->tools). I found that I should use Grass API but I don't know the code ...
1
vote
0answers
75 views

Python script split up

I have a python script which works with Grass 6.4. At some point during the project I decided to split this big python script into several scripts. I have made all necessary variables global, created ...
1
vote
0answers
248 views

GRASS and r.viewshed

I'm trying to run the r.viewshed command using co-ordinates held in a .csv file I imported using v.in.ascii. It has over 200 rows and I'm looking to run viewsheds from each line, without doing it ...
1
vote
0answers
878 views

How to process multiple images in Grass GIS

first of all, I have to mention that I'm almost new working with Grass and I'm using Grass 6.4.3 on Linuxmint 16. I need to process a large number (~300) of Landsat images. I have downloaded the ...
1
vote
0answers
231 views

Is there any GRASS command to measure the distance between a point in rastermap and another in vector map?

I have a question about WinGRASS 6.4.3. Is there any GRASS script command to measure the distance between a point in rastermap and another in vector map? I have a raster map and a vector map. Raster ...
0
votes
0answers
48 views

GRASS GIS 7.8 Delete mapset from command line

Within GRASS GIS 7.8, a new mapset can be created using g.mapset -c mapset=mapset location=location, but is it possible to delete a mapset from the command line? I know that a mapset can be removed ...
0
votes
1answer
12 views

How to display graphics in IOS when connected remotely with Linux server?

I am trying to work using GRASS GIS for my data remotely from Mac. Here is what I have done: XQuartz was installed and run; Terminal was run. I typed: ssh -Y root@IPaddress Then I typed: grass64 (to ...
0
votes
0answers
2k views

eval and cats is not recognized as an internal or external command, operable program or batch file in GRASS GIS

I'm trying to do the r.lfp and r.accumulate examples for multiple longest flow paths, except I keep getting the "eval" or "cats" "is not recognized as an internal or external ...
0
votes
1answer
29 views

r.green error installation on GRASS

I am using GRASS GIS 7.0.3 on linux, however I've been trying to install the r.green extension on GRASS and always get the error message: "ImportError: cannot import name set_path" "...
0
votes
0answers
26 views

Create a loop to run and store the r.stats output of several viewsheds?

I have 15 viewsheds (view 0-14) from which I would like to export the cell count. I can do this for one viewshed through: count=[] i=0 viewshedSize=grass.read_command("r.stats", overwrite=True,flags=...
0
votes
1answer
30 views

Creating reclass-rules-textfile within Simple Python Editor of GRASS GIS

We are writing a script with the simple Python editor (GRASS GIS). We try to set the rules for a reclass command within the script (without creating a txt.file manually). Is it possible to set the ...
0
votes
0answers
107 views

GRASS GIS: From multiple lines to single line

This seems like a simple process but somehow I am not able to solve this. The situation is as follows: I have three separate lines which form visually 1 line. As I want to further process these lines ...
0
votes
0answers
46 views

GRASS v.hull for many point sets

I have map "my_pointmap" with 3D points with ids=(1,2,3...N). I have also list of subsets of these point ids , S = [(1,2,3,4),(2,4,10,12), ...]. I would love to get GRASS GIS vector map with |S| 3D ...