On Sat, 23 May 2009, Nikos Alexandris wrote:
Just FYI
# almost an hour...
Sys.time() ; sample_2 <- readVECT6("sample_2_grid_points") ; Sys.time()
[1] "2009-05-22 23:25:02 CEST"
OGR data source with driver: GRASS
Source:
"/geo/grassdb/peloponnese/evaluation_utm/nik/vector/sample_2_grid_points/head", layer:
"1"
with 875 rows and 466 columns
Feature type: wkbPoint with 3 dimensions
[1] "2009-05-23 00:22:12 CEST"
Thanks, this is helpful. As you can see, the work is being done by the OGR
GRASS driver, not by writing a shapefile with v.out.ogr and reading that
shapefile with the shapefile driver in OGR. Since these are just points,
the simplest geometry, something is making the driver run slowly.
Does plugin=FALSE speed it up or slow it down (that would force the use of
a temporary shapefile)?
Does anyone know of interactions between SQLite storage and the OGR GRASS
driver?
By the way, just put the command inside system.time() to time it.
# while reading the csv...
Sys.time() ; sample_2 <-
read.csv(file="sample_2_grid_points_table.csv") ; Sys.time()
[1] "2009-05-23 01:39:51 CEST"
[1] "2009-05-23 01:39:52 CEST"
This is not a fair comparison, because you have to dump the CSV file from
the GRASS database first, although it won't take long. What are you using
to do that? Have you considered connecting to the SQLite file directly
from R? Are the (2) coordinates present in the table? See:
http://cran.r-project.org/web/packages/RSQLite/index.html
for direct reading.
Roger
Kindest regards, Nikos
_______________________________________________
grass-stats mailing list
[email protected]
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: [email protected]
_______________________________________________
grass-stats mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-stats