trouble with s.in.ascii

Hello,

I managed to import my files, noticing two thnigs:

- If I understand right, the category number is obligatory, so, even if =

there's only coordinates, and no categories defined, one has to add a #0 =
at =

the end of each line.

- In tcltkgrass, the s.in.ascii module seems to be bugged concerning the =
"fs" =

switch. In console mode I have to type "fs=3D;" (with quotes) for it to w=
ork , =

tcltkgrass doesn't seem to add the quotes.

Moritz

On Tue, 19 Sep 2000 09:31:36 +0100 (10:31 CEST), Markus Neteler wrote:

Hi Roger, hi all,

using your comments and an internal format description I have
updated the man-page of s.in.ascii (for GRASS 5 beta9, on the server
(HTML) by tomorrow).

Thanks for the hint!

Markus

On Mon, Sep 18, 2000 at 12:29:31PM -0400, LWA Albuquerque wrote:
> =

> =

> On Mon, 18 Sep 2000 mlennert@club.worldonline.be wrote:
> =

> > Hello,
> >
> > I have trouble trying to import a simple ascii site file (X Y) into=

Grass5b8.

> > Using s.in.ascii I always get the error message: "WARNING: error sc=

anning

> > floating point attribute".
> >
> > What am I doing wrong ?
> =

> I'm new to Grass, and had the same problem the first time I tried usi=

ng

> s.in.ascii (Grass 5beta7 compiled with EGCS 2.91.60 using glibc2). I=

f

> your problem has the same cause as mine, then there's a simple fix. =

The

> manual page for s.in.ascii omits a fairly important detail of the asc=

ii

> sites file format. I think the format may be more completely documen=

ted

> elsewhere in the manual pages. What follows I got from the source co=

de.

> =

> Each line of the ascii input file should contain either two or three
> coordinates (x,y and optionally z) separated by a user-selectable
> field-delimiting character. After the coordinates there are optional=

> attribute fields separated from the coordinates and from each other w=

ith

> the same user-selectable field delimiter.
> =

> The attribute field may be a category number, a decimal value or a st=

ring.

> Category numbers must be preceded by the "#" character and string val=

ues

> must be preceded by the "@" character. Floating point values may be
> preceded by the "%" character but if there is no "#" or "@" preceding=

the

> attribute then it is assumed to be a floating point value. Also, str=

ing

> values that contain blanks must be quoted or the part of the string
> following the first blank will be parsed as a separate field, which m=

ay

> cause an error.
> =

> I received the error you describe by 1) not using the "@" symbol befo=

re a

> string attribute (causing it to be parsed as a floating point value) =

and

> 2) not quoting the string, causing the second and later words of the
> string to be parsed as separate fields.
> =

> I think the best way to avoid further problems with this would be to
> either include more complete description of the format in the manual =

page

> for s.in.ascii or to provide a reference in the s.in.ascii man page t=

o the

> page that does contain the complete description.
> =

> As I said, I'm quite new at Grass so please correct me if I'm wrong.
> =

> =

> Roger Miller
> =

=

-- =

Dipl.-Geogr. Markus Neteler * University of Hannover
Institute of Physical Geography and Landscape Ecology
Schneiderberg 50 * D-30167 Hannover * Germany
Tel: ++49-(0)511-762-4494 Fax: -3984

=

Subject: Re: trouble with s.in.ascii =

--------