[GRASS-dev] Re: [GRASS-user] Large vector files

Glynn Clements glynn at gclements.plus.com
Mon Oct 9 06:39:41 EDT 2006


Hamish wrote:

> HB:
> > > > I am always looking for feedback on how r.in.xyz goes with massive
> > > > input data. (>2gb? >4gb?)
> GC:
> > > r.in.xyz doesn't use LFS, so it will be limited to 2Gb on 32-bit
> > > systems (any system where "long" is 32 bits). As it uses ANSI stdio
> > > functions (including ftell/fseek), extending it to support large
> > > files would be non-trivial.
> 
> It's inherent in the purpose of the module that it be LFS compliant.
> 
> I disagree with "extending it to support large files is non-trivial":
> 
> All the filesize, ftell, fseek calls don't need to be there and can 
> easily be #ifdef'd out if required. They are just there for the
> (somewhat lame & inaccurate; but fast, lightweight, and non-critical)
> guess at the total number of lines in the input file to pass to
> G_percent().

In that case, if you remove the fseek/ftell calls, LFS should be
straightforward. You just need include <grass/config.h> before
including any other header.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list