other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
v.edit(1grass) | Grass User's Manual | v.edit(1grass) |
NAME¶
v.edit - Edits a vector map, allows adding, deleting and modifying selected vector features.KEYWORDS¶
vector, editing, geometrySYNOPSIS¶
v.editFlags:¶
- -r
-
- -c
-
- -n
-
- -t
-
- -1
-
- --verbose
-
- --quiet
-
Parameters:¶
- map=name
-
- layer=integer
-
- type=string[,string,...]
-
- tool=string
-
- input=name
-
- move=x,y
-
- thresh=float[,float,...]
-
- ids=range
-
- cats=range
-
- coords=x,y[,x,y,...]
-
- bbox=x1,y1,x2,y2
-
- polygon=x,y[,x,y,...]
-
- where=sql_query
-
- query=string
-
- bgmap=name[,name,...]
-
- snap=string
-
- zbulk=value,step
-
DESCRIPTION¶
The module v.edit allows the user to edit a vector map via command line interface. v.edit supports only "simple" vector features: points, centroids, lines and boundaries. Currently, only 2D vector features (except of tool zbulk) are supported. Provides editing features' geometry. Attribute data connected to the vector map are not modified at all. Vector features can be selected either by internal id, category number cats, coordinates coords, bounding box bbox, polygon, where statement (attribute data) or by query. Selecting features by coordinates is affected by the current 2D resolution or by the threshold distance given by thresh. The options are orthogonal, i.e. can be used in various combinations. For example:coord=599505,4921010,603389.0625,4918292.1875 \
thresh=10000 where="label='interstate'"
NOTES¶
If no vector features are selected or the flag -t is used, topology is not build at the end.USAGE¶
Feature selection¶
Vector features can be selected in several ways: ids - using internal (unique) feature id's cats - using category numbers coords - using x,y coordinate pairs (center of bounding box, size defined by thresh) bbox - using bounding box polygon - using polygon (at least 3 coordinate pairs have to be set) where - using where statement (attribute data) query - special query (e.g. minimal vector line length) Additional parameters for vector feature specification are: layer - layer number (currently used only with cats or where option) thresh - threshold distance used for selecting vector features by coordinatesTool description¶
create - Create new (empty) vector map (see v.in.ascii). Optionally vector features (in GRASS ASCII standard format) can be read from standard input ( input=-) or from the text file given by the input option. add - Add new vector features (defined in GRASS ASCII standard format) to existing vector map. Features can be read from standard input or from the given text file ( input option). If no header is given, the -n flag must be used. Added features can be snapped (defined by snap parameter) to nodes or vertices based on threshold distance thresh. delete - Delete selected vector features from existing vector map. copy - Make identical copy of selected vector features. If background map bgmap is given copy features from background map, not from currently modified vector map. move - Move selected features of existing vector map relatively to their current location. This tool requires move option. The option defines coordinates of the movement direction. Moved features can be snapped (defined by snap parameter) to nodes or vertices based on threshold distance thresh. flip - Flip direction of selected vector lines (lines or boundaries). catadd - Add new layer category(ies) to selected vector feature(s). Category can be later used for new database entry. catdel - Delete layer category(ies) of selected vector feature(s). merge - Merge (at least two) selected vector lines or boundaries. The geometry of the merged vector lines can be changed. If the second line from two selected lines is in opposite direction to the first, it will be flipped. See also module v.build.polylines. break - Split given vector line or boundary into two lines on location given by coords. If coords not given, breaks all selected lines at each intersection (based on v.clean, tool=break). snap - Snap vector features in given threshold. See also module v.clean. Note that this tool supports only snapping to nodes. Parameters snap and bgmap are ignored. connect - Connect selected lines or boundaries, the first given line is connected to the second one. The second line is broken if necessary. The lines are connected only if distance between them is not greater than snapping threshold distance thresh. chtype - Change feature type of selected geometry objects. Points are converted to centroids, centroids to points, lines to boundaries and boundaries to lines. vertexadd - Add vertex(ces) to the given vector lines or boundaries. Location of the new vertex is given by coord option. If -1 is given only first found line or boundary in bounding box is modified. vertexdel - Remove vertex(ces) specified by coords option. If -1 is given only first found line or boundary in bounding box is modified. vertexmove - Move vertex(ces) specified by coords option. Direction of the movement is specified by the move option. If -1 is given only first found line or boundary in bounding box is modified. Moved vertex can be snapped (defined snap) to nodes or vertices based on threshold distance thresh. zbulk - Assign z coordinate to 3D vector lines in given bounding box. The first found line will get z coordinate based on value given by zbulk parameter. Z coordinate of other selected lines will be increased by step given by zbulk parameter. This tool strictly requires bbox and zbulk parameter. Also input vector map must be 3D. select - Print comma separated list of selected line id's. No editing is done.EXAMPLES¶
Create new vector map¶
Create new (empty) vector map:Add new features to existing vector map¶
Add point to the vector map (without header):640794 214874
1 1" | v.edit -n tool=add map=vectmap
Delete selected features from vector map layer¶
Remove all vector features with category number 1 or 2:coord=592542.892,4924766.996,603389.062,4918292.187 \
thresh=1000 cat=1,2
Copy selected features from background map¶
Copy all features with category number 1 from background map:Move features¶
Move feature (vector point) located on coordinates 602580,4918480 to coordinates 603580,4919480:Flip direction of vector lines¶
Flip direction of all vector lines:Add / delete layer category number¶
Add new layer/category 2/1, 2/3, 2/4, 2/5 to features covered by given polygon:polygon=599877.75,4925088.375,597164.812,4922524.5,601338.562,4920914.625 \
layer=2 cat=1,3-5
Merge lines¶
Merge two lines with given category number:Split line on given point¶
Split line id 810 on coordinates 604268,4923570 in threshold 50 map units:Break selected lines at each intersection¶
Break selected lines (with category number 1) at each intersection:Snap lines¶
Snap all lines using threshold distance 20 map units:Connect lines¶
Connect line id 48 to line id 565:Add vertex¶
Add new vertex to the line located at 600952,4926107, threshold is set to 1 map unit:Delete vertices¶
Delete vertex located at 593191.608,4925684.849 (threshold set to 0.1 map units). Modify only lines with category 1:thresh=1-e1 cats=1
Move vertices¶
Move vertices located at 604441,4921088 (threshold set to 100 map units). Modify only lines with categories 1-10:thresh=100 move=1000,1000
Select features and print their id's¶
Print id's of selected features, e.g.:bbox=595733.8125,4919781.75,598536.1875,4917396.75 --q
coord=592542.89243878,4924766.99622811,603389.0625,4918292.1875 \
thresh=1000 --q` col=red
Fix height of contours¶
Intput vector map contains 2D lines representing contours. Height can be assign to the contours using tool zbulk. First of all 2D lines need to be converted to 3D lines:zbulk=1000,10
SEE ALSO¶
v.in.ascii, v.info, v.build, v.clean, v.digit, v.extrude See also wxGUI vector digitizing tool.AUTHOR¶
Original author: Wolf Bergenheim - independent developerGRASS 6.4.4 |