Questions tagged [grass-gis]
GRASS GIS (Geographic Resources Analysis Support System) is a free, open source geographical information system (GIS) specialized in handling raster, topological vector, image processing, and graphic data. GRASS GIS is a high performance analytical GIS and remote sensing with focus on modularity. Users can process both day-to-day data as well as massive time series.
2,269
questions
0
votes
0
answers
14
views
v.generalize along tile edges
I have a problem with v.generalize and I hope I can find help here.
So what I'm trying to do is the following: I have a large number of 1x1 km tiles of rasters that represent traffic areas (roads, ...
0
votes
1
answer
15
views
Can't find d.rast.edit in my GRASS modules
I'm trying to manually edit a raster by using the GRASS tool d.rast.edit as I've seen it's worked for other users. However, even though I have the rest of the GRASS tools, I can't seem to find the ...
0
votes
0
answers
17
views
v.clean with rgrass does not work, vector type not found
I'm trying to clean a vector file called network with rgrass library using v.clean. Here's my code:
Sys.setenv("GRASS_INSTALLATION"="C:/Program Files/GRASS GIS 8.3/")
library(...
0
votes
1
answer
18
views
r.out.gdal exports raster with projection but without extents
Exporting raster with r.out.gdal with PCRaster driver gives two files - .map itself and .xml with projection and colormap. But... I can't find the information about extent. Projection is EPSG:4623 (...
0
votes
1
answer
36
views
DCELL cell type is set automatically for raster after r.resamp.interp
After interpolation with r.resamp.interp with bilinear method DCELL cell type is set for raster. When I export it with r.out.gdal I get a precision loss error, as I export it as Float32 (PCRaster ...
0
votes
0
answers
33
views
Colour intersecting viewsheds by number of intersects
I'm creating a PyQGIS plugin which utilises the Grass7 r.viewshed algorithm. It creates viewsheds as .tif Layers in the project, using the main raster layer as a Digital Terrain/Elevation Model for ...
0
votes
0
answers
23
views
Why importing QGIS rasters into GRASS Mapset is not working
I am using GQGIS 3.30. I enabled GRASS and Processing Plugins, and pointed them to the right directory. I created a new mapset and location. Then I used the GRASS toolbox "Import raster into ...
0
votes
0
answers
27
views
Input/Output Warning and uncompression error during v.rast.stats processing
First I use command r.slope.aspect elevation=dem slope=dem_slope format=percent --overwrite to calculate slopes in percent.
I get a warning during slope calculation: WARNING: Unable to flush file ...
0
votes
1
answer
117
views
GRASS r.horizon returns nonsense
I am trying to calculate the horizon profile from a point on a mountainside, through the appropriate DTM elevation file and the GRASS function r.horizon.height (via QGIS).
However, the output looks ...
0
votes
0
answers
25
views
Different area between Query raster/vector tool and v.to.db
I found a discrepancy between the select GUI tool "Query raster/vector" and v.to.db, and I do not know why. I attached the pictures.
First image (image 1) show that the attribute "...
0
votes
0
answers
36
views
Using v.voronoi.skeleton in Qgis 3.43 with Grass8
In previous QGIS-versions that used Grass7 I designed a model that used v.voronoi.skeleton. But with the upgrade to 3.43, and Grass8, this model will not work anymore. It complaints that grass7:v....
0
votes
0
answers
27
views
Why new v.dissolve procedure generates new database tables and causes an error on adding columns later?
The new v.dissolve procedure includes, as the documentation states, two independent processes: v.reclass and v.extract, being a front end to those.
In my case when v.reclass is called it creates a new ...
1
vote
1
answer
43
views
What is the right way to dissolve vector features in GRASS GIS on attribute values of one column summarizing or averaging others?
The line product of v.overlay contains a column with zones number and a stack of other attributes.
What I want:
Dissolve features (lines) on attribute column that contains zones number. Other ...
0
votes
0
answers
27
views
How to get zonal statistics of a vector map by areas from another vector map in GRASS GIS?
I have a map with areas (polygons) and another map with lines for example. Lines have multiple attributes and I want some of them to be summed and written to new columns of my areas map. Each polygon ...
0
votes
0
answers
39
views
How do I calculate albedo in QGIS from a Landsat 8 image downloaded from EarthExplorer
I'm using QGIS and I'm struggling to calculate the albedo from the images. I don't understand how to use GRASS as every time I use it, I get something that doesn't make sense.
Sor far, I have ...
0
votes
2
answers
76
views
Segment lines by given divider
I a trying to segment lines with specific values that are stored in a field. For example, I need my line 1 which is ~84m long, to be segmented into two segment that are 31m and 53m long. I have a ...
0
votes
1
answer
34
views
Use v.clean function from GRASS in Jupyter Notebook
I want to automate a process which involves using v.clean tool from GRASS inside a Jupyter Notebook. I've read documentations on how to use Python with GRASS, but it seems impossible to do it or I don'...
0
votes
2
answers
75
views
Fatal Error when trying to download addons for GRASS 8.3.1
I get an error with g.extension r.stream.order:
ERROR: Failed to get branch from the Git repository
<https://github.com/OSGeo/grass-addons/>.
fatal: unable to access 'https://...
0
votes
1
answer
29
views
How can I update a column of a vector layer for reversed selection of features using command line?
Let it be two layers:
one with multiple polygons,
other with one.
The task is:
to select features of first layer that intersect with the second,
then calculate values of a new column (for example: ...
0
votes
1
answer
33
views
How to resolve "Rscript not found" error when executing r.futures.potential in GRASS GIS?
I'm trying to run a Python simulation script in GRASS GIS 8.3.1 on Windows that utilizes the r.futures module. I get the following error when the r.futures.potential command is reached:
ERROR: ...
1
vote
1
answer
107
views
Cannot install GRASS addons in GRASS 8.2 (Ubuntu jammy)
I am trying to install the r.clip addon in GRASS 8.2 in Ubuntu 22.04.3 LTS (jammy). I installed GRASS 8.2.0-1~jammy0 from https://launchpad.net/~ubuntugis/+archive/ubuntu/ppa and ideally need to use ...
2
votes
1
answer
265
views
PCRaster Tools, GRASS and SAGA installation on QGIS 3.34.2 for MacOS
I have followed the instructions here https://www.youtube.com/watch?v=RaFrXzw7IvI to install PCRaster Tools via conda, which is working.
However it appears that all of my previously installed packages ...
0
votes
0
answers
18
views
r.mapcalc in GRASS GIS fails to mask rasters
I have a raster binary map (0-1) where 0 represents unsuitable areas (violet) and 1 represents suitable areas (yellow). I want to crop another raster (red) based on this suitability (for several ...
4
votes
0
answers
85
views
Install GRASS missing addons within QGIS
I'd like to use r.sun.hourly and r.sun.daily from within QGIS but it doesn't seem to be present in GRASS tools.
I tried to install it using g.extension in the GRASS shell, but it says I have to run it ...
0
votes
1
answer
23
views
r.cross: max number of input map layers?
r.cross serves for combining multiple maps.
The current docu (https://grass.osgeo.org/grass83/manuals/r.cross.html) states in section Parameters:
Names of 2-30 input raster maps
However, further ...
-1
votes
0
answers
74
views
Hans Der Kwast Derive Streams and Catchments Model - WKT issue
After spending a couple of days fixing this problem:
Hans Der Kwast - Derive Streams and Catchments Model (r.to.vector not outputting file) thought i had a working model
I am now encountering ...
1
vote
0
answers
36
views
Running grass7:r.watershed in QGIS gives different results to running identical process in QGIS
a former colleague created a QGIS tool in Python for the Team which creates Flow Routes and TWI (Topographic Wetness Indicator) maps for a selected location.
I have run through the code and copied the ...
0
votes
0
answers
55
views
Hans Der Kwast - Derive Streams and Catchments Model (r.to.vector not outputting file)
I'm using the model created below and following the steps from 17:00 onwards
https://youtu.be/ZC0skH4ifsI?list=PLeuKJkIxCDj2Gk0CkcJ-QeviE41aMZd-5&t=1021
I've followed the osgeo4 installation steps ...
0
votes
0
answers
46
views
Installing old extension using g.extension of GRASS GIS
I am new to GRASS GIS and trying to get this extension I found working.
https://gitlab.com/invafish/r.stream.culvert
So, it fails to find if I try g.extension
g.extension r.stream.culvert url=” https:/...
0
votes
0
answers
25
views
QGIS Grass Raster import using r.in.gdal.qgis: 'Layer data source could not be found'
I'm a QGIS learner following the official QGIS Training Manual. I'm on Module 12.1. My problem is that when I try to add a raster layer to GRASS using r.in.gdal.qgis, the resulting layer shows a red ...
1
vote
1
answer
38
views
Why stream numbers generated by r.stream.order go one after other, not succeeding
Subwatersheds and streams corresponding form an 2n+1 series, where n=0,1,2...
I don't know for what reason, and I also doubt if it works like that in all cases.
It's very useful for me as I would like ...
0
votes
0
answers
16
views
Is it possible to split a polygon-subwatershed with a gage point without v.overlay?
After creating a clean map of subwatersheds I want to split some where control gages are located. If I try to do this with v.overlay (AND) - clipping subwatersheds previously generated with r.basins ...
0
votes
0
answers
25
views
Using gdal_translate to convert 32-bit raster to byte is black
I have a 32-bit float raster in GRASS. It is a single channel Sentinel 2 raster. I can export to geotiff with r.out.gdal:
g.region rast=orthoimage_red
r.out.gdal input=orthoimage_red output=...
1
vote
0
answers
52
views
GRASS paths in Python standalone from QGIS install
I am trying to access GRASS from Python (Spyder).
I have:
Installed via pip install grass-session
Started GRASS from OSGEO4W, loaded the mapset and location
Started Spyder from Anaconda
Tried to ...
1
vote
1
answer
50
views
Creating relation for duplicate lines
I have two datasets with some duplicate lines. I can select the duplicates with GRASS v.select:
v.select ainput=map1 binput=map2 output=duplicates operator=equals
or QGIS Select by Location:
...
0
votes
0
answers
29
views
Exporting .LAS file after using v.lidar.correction
Question
I want to use the GRASS GIS LIDAR modules (v.lidar.edgedetection, v.lidar.growing, and v.lidar.correction) to classify points for LAS files. I'm very new to working with databases, and the ...
0
votes
1
answer
38
views
Why is r.grow.distance in GRASS GIS returning a raster with all values = 0?
I'm trying to create a raster map that contains "Euclidean" distances to roads from another raster that contains said roads, by using r.grow.distance in GRASS GIS. The command executes ...
0
votes
1
answer
30
views
GRASS build polylines based on category/ID (v.net.distance)
I have calculated shortest routes between citywide origin-destination pairs with GRASS and v.net.distance. These routes are segmented, however, and I would like to turn them into polylines based on ...
0
votes
1
answer
88
views
Running GRASS GIS from PyCharm
I follow the Working_with_GRASS_without_starting_it_explicitly with GRASS 7.8.8 (2023), but it did not work as intended. The Python line "gs.message" runs, but the line "gs.run_command('...
0
votes
0
answers
32
views
Exporting records with more than 250 characters in a field to GML
I am trying to export OSM vectors to the GML format like:
v.out.ogr input=network output=network.gml format=GML
I get an error that the field a_other_tags has more than 250 characters:
ERROR 1: ...
0
votes
0
answers
15
views
r.mfilter not applying to raster map
I tried applying r.mfilter to my raster map and it is saying error and not creating any filtered layer. I have tried closing the app and redid project again and upgraded grass as well but still the ...
0
votes
0
answers
33
views
Specify pixel data type importing raster into GRASS with r.in.gdal
When I import 8-bit grayscale images into GRASS with r.in.gdal the datatype used is float32 and is unnecessarily 4 times larger. I can specify the datatype when I export with r.out.gdal but I can't ...
2
votes
0
answers
82
views
PostGIS (hopefully faster) alternative to v.overlay with or condition from GRASS
I have two distinct tables, one called rpg(id, code_culture, geom --polygons) and the other called ia(id, classe, geom --also polygons)
Like this :
How should I proceed to get a single table with a ...
0
votes
1
answer
21
views
Errors building GRASS
I am trying to build grass-8.3.0 on a Debian Linux system. The configuration portion has only one flag:
--without-pdal
because Debian 12 does not have that package. The compilation finishes with:
...
0
votes
1
answer
70
views
Getting errors on startup of GRASS
I downloaded the Mac/Intel chip binary for GRASS 8.3 and put it in my Applications folder. On startup, I am seeing this in the terminal--
MacBook-Pro:~ me$ /Applications/GRASS-8.3.app/Contents/MacOS/...
0
votes
0
answers
40
views
GRASS GIS v.out.ogr too many export too many feature shp
I have a vector maps that contains 16 points (from v.information) I would like to export them in Shapefile format, but when I use v.out.ogr I got this message :
Exporting 16 features... 28 features ...
0
votes
1
answer
83
views
GRASS GIS Encoding
I want to know if there is a way to change the default GRASS GIS 7.8.7 encoding (UTF-8) to (ISO-8859-1).
My problem is that I have accent words in my "attribute data" (á,é,í, etc), so when I ...
1
vote
1
answer
49
views
QGIS Raster resampling without label changes
I am working on raster data that which is in a 5x5 meter resolution. I need to resample this to a 25x25 meter resolution. I have used resample.stats which works, but changes the label numbers into one ...
1
vote
0
answers
37
views
In GRASS GIS db.execute IN statement works, but NOT IN doesn't
Here is my command:
db.execute sql="UPDATE table SET factor=number2 WHERE label IS NOT NULL AND number2 IN (SELECT label FROM table)"
This command sets TRUE on those rows, where label in ...
0
votes
2
answers
80
views
Find distance from point to coastline
I have a layer of ~2 million line segments representing rivers, and a layer of ~300 000 line segments representing the coastline. I want to extract the river outlets.
I've tried a bunch of different ...