[GRASS-user] Rscript error when using v.class.mlR

2022-02-18 Thread Daniel Kozar via grass-user
Hi everyone,

When using the extension "v.class.mlR" I get an error [Message 1] (see
below) that "Rscript" cannot be located. I traced this back to the script
for "v.class.mlR" and edited line 908 to read the direct path to Rscript -
'/usr/local/bin/Rscript' rather than 'Rscript' alone. However, when I
re-open GRASS 8.0 I get an error [Message 2] that the extension failed when
loading and that the operation isn't permitted. I allowed for the
application to have administrative rights but it still doesn't work. Does
anyone know how to work around this or solve the issue finding "Rscript"?

I have R running and have installed necessary packages. I'm running GRASS
on MacOS Monterey.

Any help would be appreciated.
- Daniel
-
*[Message 1]*

Running R now. Following output is R output.

Traceback (most recent call last):

  File "/Users/dankozar/Library/GRASS/8.0/Addons/scripts/v.class.mlR", line
977, in 

main()

  File "/Users/dankozar/Library/GRASS/8.0/Addons/scripts/v.class.mlR", line
908, in main

subprocess.check_call(

  File
"/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
line 368, in check_call

retcode = call(*popenargs, **kwargs)

  File
"/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
line 349, in call

with Popen(*popenargs, **kwargs) as p:

  File
"/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
line 951, in __init__

self._execute_child(args, executable, preexec_fn, close_fds,

  File
"/Applications/GRASS-8.0.app/Contents/Resources/lib/python3.9/subprocess.py",
line 1821, in _execute_child

raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'Rscript'


*[Message 2]*

Details: <[Errno 1] Operation not permitted: 'v.class.mlR'>

WARNING: Some addons failed when loading. Please consider to update your
addons by running 'g.extension.all -f'.

-- 
Thank you,

Daniel Kozar
PhD Candidate
UC Davis - Hydrologic Sciences
djko...@ucdavis.edu
(814) 380-6900
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] How to detect/remove overlapping polygons (imported with v.in.ogr )based on the data attributes

2022-02-18 Thread B H
I have data  in a Shapefile which has genuine  cases of overlapping
geometries. (As documented in  v.in.ogr) the common areas appear with
multiple categories.
I need to find these common areas and "dedupe" them.
Currently I  export the data out via v.out.ogr and in postgis do  select
distinct on (st_asbinary(geometrycomlum))  from tablename  order by
priorityattribute

Is there some way to either dedupe it in grass Gis itself, or have
v.out.ogr output  some common attribute in the two geometries that
represent the common area
from two polygons.
There is a similar question in this old thread. However I could not find
the solution.
https://lists.osgeo.org/pipermail/grass-user/2019-May/080293.html




---
clip from v.in.ogr  man page describing how  the overlapping polygons are
handled.

Overlapping polygons
When importing overlapping polygons, the overlapping parts will become new
areas with multiple categories, one unique category for each original
polygon. An original polygon will thus be converted to multiple areas with
the same shared category. These multiple areas will therefore also link to
the same entry in the attribute table. A single category value may thus
refer to multiple non-overlapping areas which together represent the
original polygon overlapping with another polygon. The original polygon can
be recovered by using v.extract with the desired category value or where
statement and the -d flag to dissolve common boundaries
Thanks,
Hemant
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user