[GRASS-stats] Speedup of readVECT6() with plugin

Roger Bivand Roger.Bivand at nhh.no
Mon Jun 2 12:07:53 EDT 2008


On Mon, 2 Jun 2008, Markus Neteler wrote:

> Dear Roger,
>
> On Sun, Jun 1, 2008 at 11:22 PM, Markus Neteler <neteler at osgeo.org> wrote:
> ...
> If I manually set plugin=TRUE, it fails:
>> lidar1 <- readVECT6("lidar1map3d", ignore.stderr=TRUE, plugin=TRUE)
> Error in ogrInfo(dsn = dsn, layer = layer) : Cannot open file
>
> With debugging I found that the map is only searched in the
> current mapset. In my case, however, the map is sitting in another mapset...
> Would it be possible to add g.findfile there to construct the full
> path to the map?

Please use the new mapset= argument in readVECT6() or readRAST6(). I 
prefer this for the moment to trying to insert @ parsing or extra code. 
The user can run system("g.findfile ...") to check.

Roger

>
> g.findfile element=vector file=gauss_random
> name='gauss_random'
> mapset='sqlite'
> fullname='gauss_random at sqlite'
> file='/home/neteler/grassdata/nc_spm_07/sqlite/vector/gauss_random'
>
> The "file" line contains (almost) the dsn path (+ /head)
>
> Best wishes,
> Markus
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the grass-stats mailing list