Re: [GRASS-user] Raster boxplots selection

2024-08-07 Thread Paulo van Breugel via grass-user
On Wed, Aug 7, 2024 at 11:00 AM sibylle via grass-user <
grass-user@lists.osgeo.org> wrote:

> Dear coummunity
>
>
>
> I am wondering if my code for selecting specific raster points (e.g.
> squares, Quadrate) has a bug. I do not want to plot all squares, because I
> still have not yet data for all squares.
>
>
>
> v.extract quadrat out=quadrat_3 where="ID_Quadrat=527190 and
> ID_Quadrat=569228 and ID_Quadrat=581166" --o
>
>
>
The where statement will result in no quadrats selected. Use 'or' instead
of 'and':

v.extract quadrat out=quadrat_3 where="ID_Quadrat=527190 or
ID_Quadrat=569228 or ID_Quadrat=581166" --o

This will give you the three quadrats (or the quadrats that have those IDs,
in case there are more quadrats with the same ID).

The resason is that I get an error on the next line
>
>
>
> v.to.rast quadrat_3 out=quadrat_3 use=attr attribute_column=ID_Quadrat
> --o
>
> ERROR: Database connection not defined for layer <1>
>
>
>
> Full Code:
>
> r.import input=allema_LZall_UAA_pres_merged.tif output=al_pres --o
>
> g.region -ap rast=al_pres
>
> v.import input=untersuchungsquadrate_2020_2024.gpkg output=quadrat --o
>
> v.info -g quadrat
>
>
>
> v.extract quadrat out=quadrat_3 where="ID_Quadrat=527190 and
> ID_Quadrat=569228 and ID_Quadrat=581166" --o
>
> v.to.rast quadrat_3 out=quadrat_3 use=attr attribute_column=ID_Quadrat --o
>
> r.boxplot -o input=al_pres zones=quadrat_3 output="al_pres_boxplot_3.png"
> raster_statistics=median –o
>
>
>
> Thanks a lot
>
> Sibylle
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Using RStudio in a GRASS GIS session

2024-04-18 Thread Paulo van Breugel via grass-user
From the message that library is not found, I wonder, did you type 

GRASS> rstudio & library(grass) 

all on the command line? 

Just to be sure, you should ope Grass gis. And in the grass gis command line, 
type

rstudio &

Next, after RStudio opens,  you type the following in RStudio

library(grass)




On April 18, 2024 7:56:03 PM GMT+02:00, Veronica Andreo via grass-user 
 wrote:
>Hello Sibylle,
>
>Perhaps you can tell us some details about your operative system, which
>GRASS installer you are using (i.e., standalone or OSGeo4W), how did you
>start GRASS, if R and RStudio are installed.
>
>From your email, I do not understand why GRASS is not recognized as a
>command, as it seems you **are** already within a GRASS session on the
>terminal? (i.e. you have a GRASS prompt there `GRASS>`).
>
>Vero
>
>El jue, 18 abr 2024 a las 12:06, Micha Silver via grass-user (<
>grass-user@lists.osgeo.org>) escribió:
>
>> Silly question, do you have the 'rgrass' library installed?
>>
>> i.e. can you do `library(rgrass)` at the R command prompt (without
>> rstudio)?
>>
>>
>>
>> On 17/04/2024 21:34, sibylle via grass-user wrote:
>>
>> Dear community
>>
>> To use RStudio in a GRASS GIS session I used the command line
>> GRASS> rstudio &
>> library(rgrass)
>> (see https://grasswiki.osgeo.org/wiki/R_statistics/rgrass)
>>
>> Unfortunately I was not able to solve the error message:
>> - The command "GRASS" is either misspelled or
>> could not be found.
>> - The command "library" is either misspelled or
>> could not be found.
>>
>> Kind regards
>> Sibylle
>>
>>
>>
>> (Wed Apr 17 20:25:17 2024)
>>
>> GRASS> rstudio &
>>
>> Der Befehl "GRASS" ist entweder falsch geschrieben oder
>> konnte nicht gefunden werden.
>> (Wed Apr 17 20:25:17 2024) Command ended with non-zero return code 1 (0 sec)
>>
>> (Wed Apr 17 20:25:29 2024)
>>
>> library(rgrass)
>>
>> Der Befehl "library" ist entweder falsch geschrieben oder
>> konnte nicht gefunden werden.
>> (Wed Apr 17 20:25:29 2024) Command ended with non-zero return code 1 (0 sec)
>>
>>
>> ___
>> grass-user mailing 
>> listgrass-user@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/grass-user
>>
>> --
>> Micha Silver
>> Ben Gurion Univ.
>> Sde Boker, Remote Sensing Lab
>> cell: +972-523-665918
>>
>> ___
>> grass-user mailing list
>> grass-user@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/grass-user
>>
>
>
>-- 
>Dra. Verónica Andreo
>Investigadora Adjunta de CONICET
>Instituto Gulich (CONAE - UNC)
>Centro Espacial Teófilo Tabanera (CETT)
>Falda del Cañete - Córdoba, Argentina
>+54 3547 40 int. 1153
>https://veroandreo.gitlab.io/
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Multidirectional hillshading scripts / addons?

2024-02-17 Thread Paulo van Breugel via grass-user
Hi,

Not sure about grass gis, but have you tried the multidirectional option
when styling a raster as a hillshade in QGIS? See
https://bnhr.xyz/2019/01/22/hillshade-in-qgis.html.

Cheers,

Paulo





On Fri, Feb 16, 2024 at 11:20 PM B H via grass-user <
grass-user@lists.osgeo.org> wrote:

> Hi,
> I am trying to create a hillshading effect using DEM rasters similar to
> ESRI multidirectional hillshading, but I am unable to get anything  in.
> grass to perform as good as ESRI (or even gdaldem multidirectional shading).
> I am hoping someone in this group has some scripts /addon/tips that I can
> try.
>
> So far I have tried the following on a few DEMs ( from 3m  to 100 m grid
> sizes).
> 1) gdaldem  multidirectional hillshading : It's not grass based, but so
> far has performed better than other grass options :  with the parameter
> zfactor between 1 and 10. But  it does not seem to be quite as good as ESRI.
> 2) Following code is based on some old discussion on this email list.(Its
> seems to exaggerate the hills and valleys more than I would expect)
> https://gist.github.com/amcox/b54d65f08fe4448840462901fd6350d4
> 3) Other variants of hillshading like r.skyview : Tried with several
> parameters but it seems to be inferior to gdaldem (It seems to be a 'washed
> out' version of the multidirectional. hillshading).
>
> Thanks,
> HB
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user