[GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)
Veronica Andreo
veroandreo at gmail.com
Mon Sep 24 06:05:49 PDT 2018
El lun., 24 sep. 2018 6:24, Roger Bivand <Roger.Bivand at nhh.no> escribió:
> On Sun, 23 Sep 2018, Helmut Kudrnovsky wrote:
>
> >> I could reproduce the problem after starting the OSGeo4W console from
> the
> >> desktop shortcut icon.
> >>
> >> The problem seems to be that OSGeo4W's console starts in a directory for
> >> which the user does not have write access (for me from a desktop
> shortcut
> >> C:\Users\Public\Desktop\OSGeo4W). Because rgrass7::initGRASS() needs to
> >> write a GISRC file in the working directory, it needs write access.
> When I
> >> changed working directory to one to which I did have write access, the
> >> current CRAN binary rgrass7 loaded correctly under OSGeo4W for a
> >> throw-away location. I haven't yet tried with a pre-existing location.
> >>
> >> Could you check and see whether this seems reasonable?
> >>
> >> If so, I'll add a check for write access in the working directory to
> give
> >> a more sensible error message.
> >
>
> Committed in r65 on https://r-forge.r-project.org/projects/spgrass/; the
> change tests whether the working directory is writable, and if not puts
> the temporary GISRC in an R temporary file. I checked Vero's scenario of
> using initGRASS under OSGeo4W with an existing location (screenshot
> attached) from the OSGeo4W console.
This is great! I could only test now, and after changing to a folder with
writing permission, all works perfectly!
Thanks so much, Roger and Helli :)
> I also corrected the PROJ shared files location for GRASS (I hope). I can
> provide a Windows binary package
> off-list if need be.
>
How to find/test for the location of PROJ shared files?
> Please let me know if this gets things working.
>
> I'm also concerned to know how rgrass7 should be maintained going forward?
> Should it be on github/r-spatial ? Should it migrate to sf/raster classes?
>
IMHO, moving to sf/raster classes seems reasonable. However, if it is too
much of a hassle or there's no consensus, going from sp to sf is just one
line in R once a GRASS vector has been read in and, for the raster data, as
well.
Thanks again!
Best,
Vero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-stats/attachments/20180924/d1fff3f8/attachment.html>
More information about the grass-stats
mailing list