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) |
mNo edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
'''A:''' | '''A:''' | ||
== CLI == | |||
==== Method 1 ==== | ==== Method 1 ==== | ||
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> | |||
== [[wxGUI]] == | |||
{{YouTube|5xBoIEpA598|desc=Add point to vector map at given position using wxGUI}} | {{YouTube|5xBoIEpA598|desc=Add point to vector map at given position using wxGUI}} | ||
[[Category:FAQ]] | [[Category:FAQ]] | ||
[[Category: Vector]] |
Latest revision as of 17:58, 31 December 2013
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