Add point to vector map at given position: Difference between revisions
Jump to navigation
Jump to search
(v.patch method, add links to help pages) |
|||
Line 21: | Line 21: | ||
{{cmd|v.in.ascii}} the new point into its own new map, then use {{cmd|v.patch}} to combine the new point with the old points (attribute tables must match exactly). | {{cmd|v.in.ascii}} the new point into its own new map, then use {{cmd|v.patch}} to combine the new point with the old points (attribute tables must match exactly). | ||
<source lang=bash> | |||
echo "100 100" | v.in.ascii input=- output=new_point_map | |||
v.patch input=old_point_map,new_point_map output=combined_points_map | |||
</source> | |||
Revision as of 12:22, 24 September 2011
Q: How to add a new point to the vector map at given position?
A:
- CLI
Method 1
- Add new point to the vector map (x=100, y=100, layer=1, category=1) with v.edit:
v.edit -n map=<map> tool=add input=- << EOF P 1 1 100 100 1 1 EOF
- Insert new record to the attribute table of the vector map (if required) with db.execute:
echo "insert into <map> values(1, ...)" | db.execute input=-
Method 2
v.in.ascii the new point into its own new map, then use v.patch to combine the new point with the old points (attribute tables must match exactly).
echo "100 100" | v.in.ascii input=- output=new_point_map
v.patch input=old_point_map,new_point_map output=combined_points_map
- wxGUI