[GRASS5] Re: r.in.gdal - precision problem in
lib/gis/adj_cellhd.c
Hamish
hamish_nospam at yahoo.com
Tue Apr 12 02:59:31 EDT 2005
> > > I have noticed in the past that v.out.ogr to a shapefile does
> > > similar strange off-by 1e-9 type errors to double precision columns
> > > in the data.
> >
> > Mhh, a systematic problem?
>
>
> No I think it is probably separate but wanted to note. A double cast to
> float and then back to double introducing some noise?
example:
G6> echo "1.0|2.0|10.2" | v.in.ascii out=ogr_testG
...
column: 1 type: double
column: 2 type: double
column: 3 type: double
...
G6> dbview -bt $MAPSET/dbf/ogr_testG.dbf
1:1.000000:2.000000:10.200000:
[db.describe output below]
G6> v.out.ogr input=ogr_testG type=point dsn=. olayer=ogr_testS
G6> dbview -bt ogr_testS.dbf
1:1.000000000000000:2.000000000000000:10.199999999999999:
Hamish
G6> db.describe ogr_testG
table:ogr_testG
description:
insert:yes
delete:yes
ncols:4
column:cat
description:
type:INTEGER
len:11
scale:0
precision:10
default:0
nullok:yes
select:yes
update:yes
column:dbl_1
description:
type:DOUBLE PRECISION
len:20
scale:6
precision:18
default:0
nullok:yes
select:yes
update:yes
column:dbl_2
description:
type:DOUBLE PRECISION
len:20
scale:6
precision:18
default:0
nullok:yes
select:yes
update:yes
column:dbl_3
description:
type:DOUBLE PRECISION
len:20
scale:6
precision:18
default:0
nullok:yes
select:yes
update:yes
More information about the grass-dev
mailing list