RE: [GRASS-dev] RE: [GRASS-user] Error importing DMS into standar dformat usingv. in.ascii

Ok, I finally got my points imported with this command:

echo "B 5 1
66.5 44.0
66.5 44.25
66.0 44.25
66.0 44.0
66.5 44.0
1 1" | v.in.ascii -n output=new_test format=standard

Note that the field separator is a space, but v.in.ascii is not explicitly
told so using the fs= parameter, which is kind of odd.

~ Eric.

-----Original Message-----
From: grass-dev-bounces@grass.itc.it
To: 'Markus Neteler '; '''grassuser@grass.itc.it' ' ';
'''grass-dev@grass.itc.it' ' '
Sent: 9/27/2006 11:43 AM
Subject: RE: [GRASS-dev] RE: [GRASS-user] Error importing DMS into
standardformat usingv. in.ascii

Again, it fails even if W and N are omitted:

echo "66.5|44.25" | v.in.ascii -n output=DMS_test format=standard --o

Error reading ascii file:
66.5|44.25
Building topology ...
0 primitives registered
0 areas built
0 isles built
Attaching islands:
Attaching centroids: Topology was built.
Number of nodes : 0
Number of primitives: 0
Number of points : 0
Number of lines : 0
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0

I tried reversing Long and Lat, but get the same error. Interestingly,
the
"Error reading ascii file" line disappears if I run the same command
without
the -n flag, but still fails:

echo "66.5|44.25" | v.in.ascii output=DMS_test format=standard --o

Building topology ...
0 primitives registered
0 areas built
0 isles built
Attaching islands:
Attaching centroids: Topology was built.
Number of nodes : 0
Number of primitives: 0
Number of points : 0
Number of lines : 0
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0

-----Original Message-----
From: grass-dev-bounces@grass.itc.it
To: ''grassuser@grass.itc.it' '; ''grass-dev@grass.itc.it' '
Sent: 9/27/2006 11:29 AM
Subject: Re: [GRASS-dev] RE: [GRASS-user] Error importing DMS into
standardformat usingv. in.ascii

Hi,

I think that decimal degree go without W and N since
the minus is used for West/South.

Markus

On Wed, Sep 27, 2006 at 12:18:54PM -0300, Patton, Eric wrote:

Trying again after converting DMS to deciaml degrees:

echo "L 4 1
66.5W|44.25N
66.0W|44.25N
66.0W|44.0N
66.5W|44.0N
1 1 " | v.in.ascii -n output=DMS_test format=standard --o
Error reading ascii file:
66.5W|44.25N
Building topology ...
0 primitives registered
0 areas built
0 isles built
Attaching islands:
Attaching centroids: Topology was built.
Number of nodes : 0
Number of primitives: 0
Number of points : 0
Number of lines : 0
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0

The above command also fails if the coodinates are given to 6 decimals
places, which probably doesn't even matter.

~ Eric.

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Patton, Eric wrote:

Ok, I finally got my points imported with this command:

echo "B 5 1
66.5 44.0
66.5 44.25
66.0 44.25
66.0 44.0
66.5 44.0
1 1" | v.in.ascii -n output=new_test format=standard

FWIW, feeding sizeable amounts of literal text to a command's stdin is
best done using a "here document" rather than using "echo", e.g.:

v.in.ascii -n output=new_test format=standard <<EOF
B 5 1
66.5 44.0
66.5 44.25
66.0 44.25
66.0 44.0
66.5 44.0
1 1
EOF

Note that the field separator is a space, but v.in.ascii is not explicitly
told so using the fs= parameter, which is kind of odd.

The fs= option only applies to format=point. Actually, most of the
options only apply to format=point.

v.in.ascii is essentially two different programs in one; format=point
and format=standard have very little in common.

--
Glynn Clements <glynn@gclements.plus.com>