[GRASS5] CELL->FP converting

Hi developers,

Here are some efforts for easy converting CELL to FP.
Please check these sources and give me a hint :slight_smile:

This module simply shows raster map's values.
There are three functions and two data types.

is_null_value() can be used for CRAY instead of G_is_null_value().
value2str() is used to print values of various type of raster.
cpvalue() copies src[scol] to dest[dcol].

RASTER_PTR union may free us from complicated typecasting.
RASTER_MAP_PTR has raster map type and it's data.

Just try. :slight_smile:

Best Regards,
Huidae Cho

(attachments)

Gmakefile (160 Bytes)
main.c (3.49 KB)

Hi Huidae,

On Fri, Oct 27, 2000 at 03:43:20AM +0900, Huidae Cho wrote:

Hi developers,

Here are some efforts for easy converting CELL to FP.
Please check these sources and give me a hint :slight_smile:

This module simply shows raster map's values.
There are three functions and two data types.

is_null_value() can be used for CRAY instead of G_is_null_value().
value2str() is used to print values of various type of raster.
cpvalue() copies src[scol] to dest[dcol].

RASTER_PTR union may free us from complicated typecasting.
RASTER_MAP_PTR has raster map type and it's data.

Just try. :slight_smile:

It seems to work fine! But generally the functions should
follow the GIS library name convention:
G_is_null_value(), ...

Do you think your new functions could become part of the
GIS library and simplify GRASS raster programming?
If so we would have to check for conflicts with existing
G_is_null_value() code. But generally such simplification is
very welcome!

Would these function be sufficient to update r.watershed to FP?

Kind regards

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'