Dear devs,
i would like to replace the separate data type definitions in the g3d lib with the definitions from gis.h.
In the g3d lib the following definitions are made:
#define G3D_FLOAT 0
#define G3D_DOUBLE 1
G3D_FLOAT stands for the data type float, G3D_DOUBLE for double.
I would like to remove those two definitions in G3d.h and replace them in the libs and modules with:
G3D_FLOAT -> FCELL_TYPE
G3D_DOUBLE -> DCELL_TYPE
Because the data types are the same (float, double), it makes IMHO
no sense to have separate definitions in raster and raster3d library.
And it simplifies the creation of modules which use raster and rast3d maps together.
I have created a patch
http://www-pool.math.tu-berlin.de/~soeren/grass/modules/grass6_datatype_patch.diff
and if nobody has any objections against it, i would like to submit these changes to CVS.
I have tested the changes with all raster3d modules and a lot of raster and vector modules (with the very useful grass testsuite) and no problems detected.
Best regards
Soeren
Sören Gebbert wrote:
i would like to replace the separate data type definitions in the g3d
lib with the definitions from gis.h.
In the g3d lib the following definitions are made:
#define G3D_FLOAT 0
#define G3D_DOUBLE 1
G3D_FLOAT stands for the data type float, G3D_DOUBLE for double.
I would like to remove those two definitions in G3d.h and replace them
in the libs and modules with:
G3D_FLOAT -> FCELL_TYPE
G3D_DOUBLE -> DCELL_TYPE
Because the data types are the same (float, double), it makes IMHO
no sense to have separate definitions in raster and raster3d library.
And it simplifies the creation of modules which use raster and rast3d
maps together.
I have created a patch
http://www-pool.math.tu-berlin.de/~soeren/grass/modules/grass6_datatype_patch.diff
and if nobody has any objections against it, i would like to submit
these changes to CVS.
extern inline float N_get_array_3d_value_fcell (N_array_3d * array3d, int col, int row, int depth);
extern inline double N_get_array_3d_value_dcell (N_array_3d * array3d, int col, int row, int depth);
extern inline void N_put_array_3d_value_fcell (N_array_3d * array3d, int col, int row, int depth, float value);
extern inline void N_put_array_3d_value_dcell (N_array_3d * array3d, int col, int row, int depth, double value);
FWIW, libgis uses _f and _d in function names, as opposed to _fcell
and _dcell.
--
Glynn Clements <glynn@gclements.plus.com>