[GRASS-dev] terracost and large files more generally

While you (plural) are cranking on the next release, it's probably not the best time to ask but...

- would it be possible to add the terracost functionality to r.cost (http://www.bowdoin.edu/~ltoma/research.html). My impression is that for a C programmer it would be fairly easy.

- file size limitations issues. I'm bumping up against a 2 gb limit in r.out.arc. We're using grass6.3, compiled with large file support and we can't export files that would be larger than 2 gb. My postdoc (who knows java but not C) and I looked at the source code for r.out.arc and couldn't see any obvious reason why there would be a size limit.

Thanks,

Jerry
Gerald Nelson
Professor, Dept. of Agricultural and Consumer Economics
University of Illinois, Urbana-Champaign
office: 217-333-6465
cell: 217-390-7888
315 Mumford Hall
1301 W. Gregory
Urbana, IL 61801

On Sat, Apr 07, 2007 at 08:13:39AM -0500, Gerald Nelson wrote:

While you (plural) are cranking on the next release, it's probably not the best time to ask but...

- would it be possible to add the terracost functionality to r.cost (http://www.bowdoin.edu/~ltoma/research.html). My impression is that for a C programmer it would be fairly easy.

- file size limitations issues. I'm bumping up against a 2 gb limit in r.out.arc. We're using grass6.3, compiled with large file support and we can't export files that would be larger than 2 gb. My postdoc (who knows java but not C) and I looked at the source code for r.out.arc and couldn't see any obvious reason why there would be a size limit.

It would be good to use this as motivation to better document
the needed steps as already drafted here:
http://grass.gdf-hannover.de/wiki/Large_File_Support

Markus

Gerald Nelson wrote:

- file size limitations issues. I'm bumping up against a 2 gb limit in
r.out.arc. We're using grass6.3, compiled with large file support and
we can't export files that would be larger than 2 gb. My postdoc (who
knows java but not C) and I looked at the source code for r.out.arc
and couldn't see any obvious reason why there would be a size limit.

The --enable-largefile configure option only enables LFS on code which
specifically chooses to use it. As r.out.arc only performs sequential
output, it's safe to enable LFS, so I've modified the Makefile to
enable it.

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

Thanks for this! I downloaded and recompiled (after a make clean) and it
seems to have worked fine. I also needed this for r.in.arc. I put the code
modifications you made into that make file and it also seems to have worked
fine. I was wondering whether you (plural, ie someone on the development
team) could drop those three lines of code into all the related routines. I
would think they are

r.out.arc
r.in.arc
r.out.ascii
r.in.ascii

others?

Thanks, Jerry

-----Original Message-----
From: Glynn Clements [mailto:glynn@gclements.plus.com]
Sent: Saturday, April 07, 2007 9:58 AM
To: Gerald Nelson
Cc: grass-dev@grass.itc.it
Subject: Re: [GRASS-dev] terracost and large files more generally

Gerald Nelson wrote:

- file size limitations issues. I'm bumping up against a 2 gb limit in
r.out.arc. We're using grass6.3, compiled with large file support and
we can't export files that would be larger than 2 gb. My postdoc (who
knows java but not C) and I looked at the source code for r.out.arc
and couldn't see any obvious reason why there would be a size limit.

The --enable-largefile configure option only enables LFS on code which
specifically chooses to use it. As r.out.arc only performs sequential
output, it's safe to enable LFS, so I've modified the Makefile to
enable it.

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

Jerry Nelson wrote:

Thanks for this! I downloaded and recompiled (after a make clean) and it
seems to have worked fine. I also needed this for r.in.arc. I put the code
modifications you made into that make file and it also seems to have worked
fine. I was wondering whether you (plural, ie someone on the development
team) could drop those three lines of code into all the related routines. I
would think they are

r.out.arc
r.in.arc
r.out.ascii
r.in.ascii

Those all seem to be okay.

The r.out.* programs don't use file positioning at all, r.in.arc uses
fseek() with a zero offset, and r.in.ascii always uses reasonably
small offsets (either relative seeks of one or two rows of data or
absolute seeks near the beginning of the file).

I've committed the changes to CVS.

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

On Sat, Apr 07, 2007 at 03:23:11PM +0200, Markus Neteler wrote:

On Sat, Apr 07, 2007 at 08:13:39AM -0500, Gerald Nelson wrote:
> While you (plural) are cranking on the next release, it's probably not the best time to ask but...
>
> - would it be possible to add the terracost functionality to r.cost (http://www.bowdoin.edu/~ltoma/research.html). My impression is that for a C programmer it would be fairly easy.
>
> - file size limitations issues. I'm bumping up against a 2 gb limit in r.out.arc. We're using grass6.3, compiled with large file support and we can't export files that would be larger than 2 gb. My postdoc (who knows java but not C) and I looked at the source code for r.out.arc and couldn't see any obvious reason why there would be a size limit.
>

It would be good to use this as motivation to better document
the needed steps as already drafted here:
http://grass.gdf-hannover.de/wiki/Large_File_Support

I would also add to that page that some exporting/inporting formats have their
own intrinsic limitations, see for instance:

http://www.gdal.org/formats_list.html

--
Francesco P. Lovergine

On Fri, Apr 13, 2007 at 09:10:17PM +0200, Francesco Paolo Lovergine wrote:

On Sat, Apr 07, 2007 at 03:23:11PM +0200, Markus Neteler wrote:
> On Sat, Apr 07, 2007 at 08:13:39AM -0500, Gerald Nelson wrote:

...

> It would be good to use this as motivation to better document
> the needed steps as already drafted here:
> http://grass.gdf-hannover.de/wiki/Large_File_Support
>

I would also add to that page that some exporting/inporting formats have their
own intrinsic limitations, see for instance:

http://www.gdal.org/formats_list.html

Done.

Markus