[GRASS5] s.in.dbf
Thierry Laronde
tlaronde at polynum.com
Thu Nov 20 10:50:50 EST 2003
Hello Michael,
On Wed, Nov 19, 2003 at 11:10:32PM +0100, Michael Barton wrote:
> Last Spring, when I was doing a lot of testing, trying to bring my
> archaeological research data into GRASS, I ran into a problem with
> s.in.dbf. Basically, it didn't work right. Sometimes it wouldn't import
> anything and other times it would import the site points (i.e., xy
> coordinates) and text fields, but remaining fields would go to 0.
>
I have hit some bugs with the `PostgreSQL' flavor of the DBF support.
Having a quick glance at the source, many problems lie in the file
dump.c (the `init' bug I have fixed in pg.in.dbf, no dynamic allocation
of data (leading to a buffer overflow) etc.).
As emphasize some weeks ago, there are thousands of duplicates/clones so
it's useless to fix something in some place, since the bugs will remain
elsewhere...
Solution:
May I suggest to dump in ASCII using the fixed version (in 5.O HEAD aka
5.3) of pg.in.dbf, format the file with some awk black magic, and
reimport using s.in.ascii ?
The new version of pg.in.dbf let you specify (in admin mode) the
separator, making it relatively easy to treat the result with awk or
some other fields processor.
Cheers,
--
Thierry Laronde (Alceste) <tlaronde at polynum.org>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C
More information about the grass-dev
mailing list