I want to add 2 new points to an existing vector map. v.edit seems to be a good way to do it. But I’ve tried to do it from standard input and from an ASCII file and it doesn’t work. I’ve followed the directions in the manual. My guess is that the examples and docs are missing something rather than this being a bug. The file I want to add to is a points file with a linked attribute file (SQLite for GRASS 7).
Attempt #1:
GRASS 7.1.svn (Spain_utm_ed50_z30):~ > echo “P 1 1 583290 4785860 1 1” | v.edit -n tool=add map=sites2 input=-
WARNING: End of ASCII file reached before end of coordinates
Building topology for vector map sites2@NeolSpread…
[nothing is built here]
Attempt #2
I saved 2 points from my original vector points file (sites2) using v.out.ascii (file=sitesout.txt). Then I changed the coordinates to match those of the 2 new points I wanted to add and changed their cat numbers to the next 2 following the last in the existing file.
GRASS 7.1.svn (Spain_utm_ed50_z30):~ > v.edit -n tool=add map=sites2 input=/Users/cmbarton/Dropbox/papers\ in\ progress/Neolithic_spread\ 2013/Paper2/Data\ for\ experiments\ 7-8/sitesout.txt
WARNING: Error reading ASCII file: (unknown type) [583290|4785860|173]
Building topology for vector map sites2@NeolSpread…
So neither method works as described in the examples for the manual.
What’s missing here?
Michael
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University
voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
Michael,
Attempt #1.
You need new lines between type, coordinates, and category lines.
echo "P 1 1
583290 4785860
1 1" | v.edit -n tool=add map=sites2 input=-
should work. The manual looks correct. I tried to put all three lines in a single line and got the same error.
Attempt #2.
You need to export to the standard format. v.out.ascii map format=standard. The manual also mentions format=standard.
Hope this helps.
Huidae
···
On Sun, May 25, 2014 at 11:54 AM, Michael Barton <Michael.Barton@asu.edu> wrote:
I want to add 2 new points to an existing vector map. v.edit seems to be a good way to do it. But I’ve tried to do it from standard input and from an ASCII file and it doesn’t work. I’ve followed the directions in the manual. My guess is that the examples and docs are missing something rather than this being a bug. The file I want to add to is a points file with a linked attribute file (SQLite for GRASS 7).
Attempt #1:
GRASS 7.1.svn (Spain_utm_ed50_z30):~ > echo “P 1 1 583290 4785860 1 1” | v.edit -n tool=add map=sites2 input=-
WARNING: End of ASCII file reached before end of coordinates
Building topology for vector map sites2@NeolSpread…
[nothing is built here]
Attempt #2
I saved 2 points from my original vector points file (sites2) using v.out.ascii (file=sitesout.txt). Then I changed the coordinates to match those of the 2 new points I wanted to add and changed their cat numbers to the next 2 following the last in the existing file.
GRASS 7.1.svn (Spain_utm_ed50_z30):~ > v.edit -n tool=add map=sites2 input=/Users/cmbarton/Dropbox/papers\ in\ progress/Neolithic_spread\ 2013/Paper2/Data\ for\ experiments\ 7-8/sitesout.txt
WARNING: Error reading ASCII file: (unknown type) [583290|4785860|173]
Building topology for vector map sites2@NeolSpread…
So neither method works as described in the examples for the manual.
What’s missing here?
Michael
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University
voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev