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

Roger Bivand Roger.Bivand at nhh.no
Sat May 31 12:35:18 EDT 2008


On Sat, 31 May 2008, Markus Neteler wrote:

> Dear Roger,
>
> On Sat, May 31, 2008 at 5:51 PM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
>> 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.
>
> Sure. but I can help you if you like (got it running on various kinds of
> machines). It's also documented:
> http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin

Including machines with SELinux running? It is very picky with ldconfig.

>
> My idea was: use it then it is present. That's just an additional
> if condition in the code. I'll figure out how to test that (I guess that
> readOGR() may know which drivers it has).

ogrDrivers() gives the installed drivers, but there would be more to do to 
check the arguments to readOGR().

>
>> In addition, there is only a read driver, I believe.
>
> Right. But accelerating read in would be quite welcome.
>
>> 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.
>
> I am not sure about this: I have all working here, just fetching things from
> CRAN. GDAL should *not* be compiled with GRASS support. Then the
> GDAL-GRASS plugin doesn't interfere and is only loaded on demand
> internally from GRASS when the GRASS driver is called.

Aha, I've been compiling with GRASS support, which was the old way. I'll 
try again.

Roger

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