i am a newbe, i had a look in the archives and couldn't find what i was looking for. I am attempting to plot a series of points on to a map. i created a CSV file using excel, 3 columns long. lat and site name. using grass 5.0.2 on Mac OSX. i attempted to import using s.in.ascii but failed.
The output:
s.in.ascii - line 2 ** invalid format **
51.60745351 -2.462143461 C>ickladerovensel
s.in.ascii - line 3 ** invalid format **
50.95993341 -2.469930701 Goathill>_St_Peterd
Couple more lines in same format, i assume that it doesn't like the co-ordinate system, why?
Your problem might be that you're using Mac line breaks instead of Unix. Macs traditionally used a different character to indicate line breaks from Windows or Unix. It's changed now with OSX - I get the impression that programs are inconsistent in whether they use the old Mac or new Unix/OSX breaks. GRASS expects UNIX line breaks and will fail if you use Mac line breaks. There are a number of programs which will convert from one to another; I use BBEdit; there's a free version available at versiontracker (http://www.versiontracker.com/dyn/moreinfo/macosx/604). Open your text file in BBEdit; there should be a series of little icons at the top of the document, one of which is a file icon; pull down this menu, and you should see the first three items as "Macintosh", "Unix" and "DOS". If your document has "Macintosh" checked, change it to "Unix", save and try again. Again there are other ways to do this, probably more efficient; but this has worked for me. Good luck,
Nick Cahill
On Mar 14, 2004, at 3:26 AM, Martin O'Loughlin wrote:
i am a newbe, i had a look in the archives and couldn't find what i was looking for. I am attempting to plot a series of points on to a map. i created a CSV file using excel, 3 columns long. lat and site name. using grass 5.0.2 on Mac OSX. i attempted to import using s.in.ascii but failed.
The output:
s.in.ascii - line 2 ** invalid format **
51.60745351 -2.462143461 C>ickladerovensel
s.in.ascii - line 3 ** invalid format **
50.95993341 -2.469930701 Goathill>_St_Peterd
Couple more lines in same format, i assume that it doesn't like the co-ordinate system, why?
I just opened the file in Vi and between every group of items is a <ctrl>M, would this be the problem?
?Thanks Martin O'Loughlin
On 14 Mar 2004, at 19:50, Nick Cahill wrote:
Your problem might be that you're using Mac line breaks instead of Unix. Macs traditionally used a different character to indicate line breaks from Windows or Unix. It's changed now with OSX - I get the impression that programs are inconsistent in whether they use the old Mac or new Unix/OSX breaks. GRASS expects UNIX line breaks and will fail if you use Mac line breaks. There are a number of programs which will convert from one to another; I use BBEdit; there's a free version available at versiontracker (http://www.versiontracker.com/dyn/moreinfo/macosx/604). Open your text file in BBEdit; there should be a series of little icons at the top of the document, one of which is a file icon; pull down this menu, and you should see the first three items as "Macintosh", "Unix" and "DOS". If your document has "Macintosh" checked, change it to "Unix", save and try again. Again there are other ways to do this, probably more efficient; but this has worked for me. Good luck,
Nick Cahill
On Mar 14, 2004, at 3:26 AM, Martin O'Loughlin wrote:
i am a newbe, i had a look in the archives and couldn't find what i was looking for. I am attempting to plot a series of points on to a map. i created a CSV file using excel, 3 columns long. lat and site name. using grass 5.0.2 on Mac OSX. i attempted to import using s.in.ascii but failed.
The output:
s.in.ascii - line 2 ** invalid format **
51.60745351 -2.462143461 C>ickladerovensel
s.in.ascii - line 3 ** invalid format **
50.95993341 -2.469930701 Goathill>_St_Peterd
Couple more lines in same format, i assume that it doesn't like the co-ordinate system, why?
I just opened the file in Vi and between every group of items is a
<ctrl>M, would this be the problem?
?Thanks Martin O'Loughlin
there is a quick way to deal with this in a UNIX environment:
a small program called 'flip' will convert between DOS (^M) and UNIX style
line endings. it is apt-gettable by the package name 'flip' since you are
on OSX, you might want to try converting the line endings with something
like awk or sed.
-dylan
On 14 Mar 2004, at 19:50, Nick Cahill wrote:
Your problem might be that you're using Mac line breaks instead of
Unix. Macs traditionally used a different character to indicate line
breaks from Windows or Unix. It's changed now with OSX - I get the
impression that programs are inconsistent in whether they use the old
Mac or new Unix/OSX breaks. GRASS expects UNIX line breaks and will
fail if you use Mac line breaks. There are a number of programs which
will convert from one to another; I use BBEdit; there's a free version
available at versiontracker
(http://www.versiontracker.com/dyn/moreinfo/macosx/604). Open your
text file in BBEdit; there should be a series of little icons at the
top of the document, one of which is a file icon; pull down this menu,
and you should see the first three items as "Macintosh", "Unix" and
"DOS". If your document has "Macintosh" checked, change it to "Unix",
save and try again. Again there are other ways to do this, probably
more efficient; but this has worked for me. Good luck,
Nick Cahill
On Mar 14, 2004, at 3:26 AM, Martin O'Loughlin wrote:
i am a newbe, i had a look in the archives and couldn't find what i
was looking for. I am attempting to plot a series of points on to a
map. i created a CSV file using excel, 3 columns long. lat and site
name. using grass 5.0.2 on Mac OSX. i attempted to import using
s.in.ascii but failed.
The output:
s.in.ascii - line 2 ** invalid format **
51.60745351 -2.462143461 C>ickladerovensel
s.in.ascii - line 3 ** invalid format **
50.95993341 -2.469930701 Goathill>_St_Peterd
Couple more lines in same format, i assume that it doesn't like the
co-ordinate system, why?