[GRASS5] data type numeric and DBMI
Martin Landa
landa at gama.fsv.cvut.cz
Wed May 25 12:48:16 EDT 2005
Hi all,
I have a small problem with importing data in Czech cadastral
data exchange format. It is ASCII file which contains
table description and data records.
For example:
&BSOBR;ID N30;STAV_DAT N2;KATUZE_KOD N6;CISLO_ZPMZ N5;CISLO_TL N4;CISLO_BODU N12;UPLNE_CISLO N12;SOURADNICE_Y N10.2;SOURADNICE_X N10.2;KODCHB_KOD N2
&DSOBR;311040708;0;654299;1427;;1;1014270001;650451.45;1069791.42;4
I have two ideas how to work with numeric types:
a) int/bigint
<N10 -> integer
>N9 -> bigint
b) as numeric
N2 -> numeric (2,0)
The problems:
a) GRASS DBMI doesn't support the data type bigint.
Solution: to add this support for relevant drivers (pg,...)
b) All numerics are determined as *double*.
Solution: numeric(x,0) -> DB_C_TYPE_INT
numeric(x,y) -> DB_C_TYPE_TYPE_DOUBLE
I am not sure, what is better. However, the numeric type
is very slow compared to the floating-point types.
Any ideas?
Thanks,
Martin
--
Martin Landa <landa at gama.fsv.cvut.cz> * http://gama.fsv.cvut.cz/~landa *
CTU Prague, Faculty of Civil Engineering, Czech Republic
More information about the grass-dev
mailing list