[GRASS-stats] rgrass7: readVECT() issue with drivers other than ESRI Shapefile

Markus Neteler neteler at osgeo.org
Thu Jun 18 02:46:51 PDT 2015


Dear Roger,

On Thu, Jun 18, 2015 at 10:28 AM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
> Dear Markus,
>
> You have commit rights, so please consider that route.

ok will do!

> Before committing, I increment Version: in rgrass7/DESCRIPTION, and run:

Should I put 0.2-0 or 0.1-1 ?

> R CMD build rgrass7
>
> in spgrass/pkg, creating rgrass7_0.1-*.tar.gz, then start GRASS 7 in the
> example location (NC basic), and run:
>
> R CMD check --run-dontrun --run-donttest rgrass7_0.1-*.tar.gz
>
> If it passes without obvious problems caused by the changes made, I commit.

My (small) changes do not cause any troubles but there is this unrelated issue:

GRASS 7.0.1RC1 (nc_basic_spm_grass7):~/software/rgrass7_svn/pkg > R
CMD check --run-dontrun --run-donttest rgrass7_0.2-*.tar.gz
* using log directory ‘/home/neteler/software/rgrass7_svn/pkg/rgrass7.Rcheck’
* using R version 3.2.0 (2015-04-16)
* using platform: x86_64-redhat-linux-gnu (64-bit)
...
* checking for unstated dependencies in examples ... OK
* checking examples ... ERROR
Running examples in ‘rgrass7-Ex.R’ failed
The error most likely occurred in:

> ### Name: initGRASS
> ### Title: Initiate GRASS session
> ### Aliases: initGRASS get.GIS_LOCK set.GIS_LOCK unset.GIS_LOCK
> ###   unlink_.gislock
> ### Keywords: spatial
>
> ### ** Examples
>
>
> initGRASS("/usr/bin/grass-7.0.0", home=tempdir())
Error in initGRASS("/usr/bin/grass-7.0.0", home = tempdir()) :
  A GRASS location is already in use; to override, set override=TRUE
Execution halted
* checking PDF version of manual ... OK
* DONE

Status: 1 ERROR
See
  ‘/home/neteler/software/rgrass7_svn/pkg/rgrass7.Rcheck/00check.log’
for details.

I don't know where the "override=TRUE" needs to be used.

> It may be worth adding a suitable example to the help page in man/, guarded
> in case some platform doesn't have the required driver on the rgdal side. I
> think that GML and GeoJSON are problematic because of the
> binary-string-binary conversions for coordinates, but we need working cases
> to start with.

Ok, my first commit will just be the small bugfix.

Regarding the idea to avoid SHAPE as internal data transfer:
The GeoJSON implementation failed because it does not accept a layer name.
But I have a (for me) working GML solution implemented which I would
prefer to send for inspection: a few lines but they look like a hack
to me. Not knowing well what's behind a rgdal call conditionalized
upon the rgdal package version, I likely implemented a workaround. At
least I can start with my analysis now :-)

> Of course, if it is more convenient for you, a diff for me to patch in would
> also be fine.
>
> Thanks for pushing (not a git pun) this!

I'm happy to "commit".

Best wishes,
Markus


More information about the grass-stats mailing list