Hi Moritz,
On Tue, Sep 19, 2000 at 11:41:32AM +0200, Moritz Lennert wrote:
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.
Actually this is not intended. You should be able to import
x1 y1 z1
x2 y2 z2
...
without #cat column. If not possible, this would be a bug.
- In tcltkgrass, the s.in.ascii module seems to be bugged concerning the "fs"
switch. In console mode I have to type "fs=;" (with quotes) for it to work ,
tcltkgrass doesn't seem to add the quotes.
No, it doesn't. But just enter
";"
into the fs field (comes out as fs=";" then).
This should work.
Yours
Markus
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 scanning
> > > floating point attribute".
> > >
> > > What am I doing wrong ?
> >
> > I'm new to Grass, and had the same problem the first time I tried using
> > s.in.ascii (Grass 5beta7 compiled with EGCS 2.91.60 using glibc2). If
> > 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 ascii
> > sites file format. I think the format may be more completely documented
> > elsewhere in the manual pages. What follows I got from the source code.
> >
> > 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 with
> > the same user-selectable field delimiter.
> >
> > The attribute field may be a category number, a decimal value or a string.
> > Category numbers must be preceded by the "#" character and string values
> > 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, string
> > 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 may
> > cause an error.
> >
> > I received the error you describe by 1) not using the "@" symbol before 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 to 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
--------
--
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