[GRASSLIST:3067] Re: [GRASS5] GRASS 5.3 real problem with s.in.ascii
Hamish
hamish_nospam at yahoo.com
Tue Mar 30 19:11:36 EST 2004
> A week back, I reported that I couldn't import any ascii file with
> string characters using s.in.ascii for GRASS 5.3 (it gave me a malloc
> error).
A couple of days ago I updated s.in.ascii to catch some common input
errors; it probably still won't load your data, but hopefully will tell
you why and then exit cleanly.
> I just had a report from a student using GRASS 5.3 under Cygwin
> (Windows XP) that s.in.ascii doesn't work at all in this context. It
> gives a 'segmentation fault. core dump' error.
If it still doesn't work with the new version, could you send me the
file you are trying to load[*] and the command line instructions you are
using?
[*] .zip or .tgz the file first so the version I get hasn't been
"cleansed" by the email systems in transit.
> s.in.ascii is the only way you can get multi attribute data into GRASS
> 5.3 for points unless you use PostgreSQL.
Nope, it isn't pretty, but you can make them by hand fairly easily; see
the "internal sites format" sections in:
http://grass.ibiblio.org/gdp/html_grass5/html/s.in.ascii.html
http://grass.ibiblio.org/gdp/html_grass5/ascii_formats.html
Or in the sites chapter of the 5.0 Programmer's Manual.
A quick way is to use a specially crafted 'awk' or 'sed' command to
convert a whitespace delimited text file. Place the file in the
$MAPSET/site_lists/ directory and it should work.
Also there is s.in.dbf, but it needs some updating, which it probably
won't get anytime soon as newer (5.7+) versions of GRASS abandon the
old sites format.
Of course s.in.ascii should really be made to work correctly in the
first place..
Hamish
More information about the grass-user
mailing list