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

Markus Neteler neteler at osgeo.org
Sat May 31 06:36:29 EDT 2008


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:

# 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


More information about the grass-stats mailing list