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

Roger Bivand Roger.Bivand at nhh.no
Sat May 31 11:51:55 EDT 2008


On Sat, 31 May 2008, Markus Neteler wrote:

> Dear Roger, all,
>
> I have to read in Lidar data from GRASS, so speed matters. I have
> modified the readVECT6() function to not export to SHAPE but
> read in directly via GRASS-GDAL/OGR plugin:

Dear Markus,

In theory maybe, but if I cannot make the plugin work (I use SELinux on F7 
for trials, and I have not found out how to make it accept the *.so from 
GRASS), then I don't think that it is going to be very helpful. In 
addition, there is only a read driver, I believe.

However, using readOGR() directly is fine, and as you show, is far 
superior to intermediate files if available.

The plugin circular dependencies are a common reason for GDAL and rgdal 
not working, I'm afraid.

Best wishes,

Roger

>
> # original, via SHAPE:
>> system("date")
> Sat May 31 12:17:05 CEST 2008
>> lidar1 <- readVECT6("lidar1map3d", ignore.stderr=TRUE)
>> system("date")
> Sat May 31 12:28:33 CEST 2008
>
>
> # simplified version using plugin:
>> system("date")
> Sat May 31 12:28:33 CEST 2008
>> lidar1 <- myreadVECT6("lidar1map3d", ignore.stderr=TRUE)
>> system("date")
> Sat May 31 12:29:26 CEST 2008
>
> I used directly readOGR():
>
> # hack:
>    res <- readOGR(dsn =
> "/home/neteler/grassdata/eth_utm32/PERMANENT/vector/lidar1map3d/head",
> layer = "1", verbose = !ignore.stderr)
>
> Would it be possible to use this approach if the plugin
> is present, otherwise fallback to SHAPE export as before?
>
> Thanks
> Markus
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats
>

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