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

Roger Bivand Roger.Bivand at nhh.no
Thu Jun 18 02:51:27 PDT 2015


On Thu, 18 Jun 2015, Markus Neteler wrote:

> 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 ?

0.1-1, as this would be a small correction of an existing functionality.

>
>> 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:

I'll fix this once you commit; it is protected by \dontrun{} in the help 
file examples, but --run-dontrun overrides that. CRAN often uses 
--run-dontrun --run-donttest to be sure that the code included in these 
exceptions is valid. I need to find a way to bracket this properly.

Sorry, I should have tried myself first!

Roger

>
> 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
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no


More information about the grass-stats mailing list