[GRASSLIST:5837] Re: 2GB+ in Grass 6.0

Glynn Clements glynn at gclements.plus.com
Thu Feb 17 20:35:26 EST 2005


M-Dàris Narti-B¹s wrote:-A

> > > Is it possible to load a 4.1 GB GeoTiff DEM into Grass 6.0 location? I'm
> > > getting "file size limit exceeded". Please help!
> > 
> >  GRASS 6.0 supports reading and writing large files (> 2GB) if it is
> > possible in your operating system. If you compile with
> > -D_FILE_OFFSET_BITS=64, you should be able to have raster maps which
> > are larger than 2Gb.
> 
> How can this be enabled in ./configure? Or it is autodetected?

The configure script automatically imports several common make
variables from the environment, including CFLAGS, so you can use e.g.:

	CFLAGS='-g -D_FILE_OFFSET_BITS=64' ./configure ...

Note that this will enable transparent large file support throughout
of GRASS. However, only the core raster I/O functions have actually
been specifically updated to support large files. Other parts of GRASS
may fail in unpredictable ways if they try to access large files.

Also, if you are using r.in.gdal to import the DEM, the GDAL library
must have been built with large file support.

> How can I check is my Grass compiled with this -Dblahblah option?

Try running "nm -D /usr/local/grass-6.0.cvs/lib/libgrass_gis.so" (or
whatever libgrass_gis is called on your system); if you see references
to open64, lseek64 etc in the output, it was built with transparent
large file support.

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




More information about the grass-user mailing list