[GRASS-dev] r3.in.ascii suggestion

Hi, a short wishlist for r3.in.ascii:

I suggest changing r3.in.ascii's nv= parameter to default to '*' instead
of the word 'none', as is done in r.in.ascii.

also, type= should be changed from "default,float,double" to
"default,integer,float,double" or "default,CELL,FCELL,DCELL"?
(or 3D DCELL map type equivalents)

Why is "precision=" there at all? Is the module adapted from r.out.ascii
or something?

could the "data source" metadata line be set to the input filename?
(example in r.in.xyz)

The help page needs cleaning, and perhaps a little 3x3x3 example.

A r3.univar module would be nice too.

thanks,
Hamish

Hi,

Hamish schrieb:

Hi, a short wishlist for r3.in.ascii:

I suggest changing r3.in.ascii's nv= parameter to default to '*' instead
of the word 'none', as is done in r.in.ascii.

Maybe "*" is more useful then "none". But if no null values are present
and "*" is set as default, the import is a bit slower (null values are checked for each voxel).

also, type= should be changed from "default,float,double" to
"default,integer,float,double" or "default,CELL,FCELL,DCELL"?
(or 3D DCELL map type equivalents)

G3d lib supports only float and double values, no integer.
The type names are G3D_FLOAT and G3D_DOUBLE.

This will hopefully change when the raster and g3d lib are
new implemented as one library.

Why is "precision=" there at all? Is the module adapted from r.out.ascii
or something?

Precision is used for creating a new g3d map -> G3d_openNewParam (...)
and is needed by G3d_setCompressionMode(...).
I have no clue how the compression works in the g3d lib. :frowning:

The parameters:

type Data type used in the output file

precision Precision used in the output file (default, max, or 0 to 52)

compression The compression method used in the output file

tiledimension The dimension of the tiles used in the output file

are set with G3d_setStandard3dInputParams () and used with G3d_getStandard3dParams ( ... ).
If you want to change something, you need to modify grass6/lib/g3d/g3dparams.c.

could the "data source" metadata line be set to the input filename?
(example in r.in.xyz)

input_opt->gisprompt = "old_file,file,input";?

The help page needs cleaning, and perhaps a little 3x3x3 example.

Added to my todo list.

A r3.univar module would be nice too.

This is already on my wish and todo list. :slight_smile:

Best regards
Soeren

thanks,
Hamish

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

HB:

> could the "data source" metadata line be set to the input filename?
> (example in r.in.xyz)

SG:

input_opt->gisprompt = "old_file,file,input";?

No, the "hist" file info seen at the end of r.info and r3.info.

I've now updated r3.in.ascii and r3.to.rast for this.

Please test r3.to.rast especially, each raster level should now show
the depth range it came from. I don't have any real multi-level data
to test with..

Hamish