GRASS Digitizing tool: Difference between revisions
Line 80: | Line 80: | ||
==Summary== | ==Summary== | ||
v.edit --help | v.edit --help | ||
Description: | Description: | ||
Edits a vector map; allows adding, deleting and modifying objects in a vector map. | Edits a vector map; allows adding, deleting and modifying objects in a vector map. | ||
Keywords: | Keywords: | ||
vector, editing | vector, editing | ||
Usage: | Usage: | ||
v.edit [- | v.edit [-tdbcn] map=name tool=string [input=string] [cats=range] | ||
[coords=x,y[,x,y,...]] [move=x,y] [bbox=x1,y1,x2,y2] [snap=value] | |||
[layer=value] [--verbose] [--quiet] | |||
Flags: | Flags: | ||
-t Do not | -t Do not use topology. | ||
-d No database updates. | -d No database updates. | ||
-b Give cats to boundaries too. | |||
-c Do not close boundaries | -c Do not close boundaries | ||
-n Don't expect a header | |||
--v Verbose module output | --v Verbose module output | ||
--q Quiet module output | --q Quiet module output | ||
Line 101: | Line 103: | ||
Parameters: | Parameters: | ||
map Name of input vector map | map Name of input vector map | ||
tool The edit | tool The edit tool to take. | ||
create - Create new vector file | |||
add - Add new vector feature to existing vector file | |||
delete - Delete feature from vector file | |||
move - Move feature in vector file | |||
vertex - Move just only vertex | |||
straight - Remove vertex | |||
merge - Merge two vector lines togher | |||
break - Add new vertex to existing vector line | |||
split - Split line into two separate lines | |||
options: create,add,delete,move,vertex,straight,merge,break,split | |||
input ASCII file to be converted to binary vector file, if not given reads from standard input | input ASCII file to be converted to binary vector file, if not given reads from standard input | ||
cats Category values | cats Category values | ||
Example: 1,3,7-9,13 | Example: 1,3,7-9,13 | ||
coords An x,y list of points | coords An x,y list of points. Required for add and move actions. | ||
move | move Difference in x,y direction for moving feature or vertex | ||
bbox Bounding box of selected feature | |||
snap Object points will snap to existing points within snap units. | |||
default: 5.0 | |||
layer Layer number | |||
A single vector map can be connected to multiple database tables. This number determines which table to use. | |||
default: 1 | |||
= r.digit = | = r.digit = | ||
The r.in.poly ascii format is almost the same as the standard vector ascii format. So the new digitizer should be able to output for both, and then we have a replacement for r.digit too! | The r.in.poly ascii format is almost the same as the standard vector ascii format. So the new digitizer should be able to output for both, and then we have a replacement for r.digit too! |
Revision as of 21:38, 22 December 2006
v.digit
GRASS digitizing tool should be
- written in wxPython Programming language or Tcl
- it should extend functionality of map display just like new Georeferencing tool does:
- (like ArcGIS does) only new "Digitizing Toolbox" would appear, after digitizing tool is started
- Vector file editing will happen in current map display, with all it's functions for zooming, quering and so on
- There should be graphical tool for database management, at least for adding (?and removing?) columns, adding new features and editing existing ones.
While digitising, edited vector file would be drawed to map display. Only currently edited or selected features would be stored in memory. This should spead up digitising and redrawing process significantly.
v.edit
GRASS graphical digitising tool should be graphical front-end for new v.edit module. v.edit should be CML tool for
- creating new vector file, eventualy overwrite existing ones create
- adding new features (points, lines, polylines, centroids) add
- removenig old features (with database record) delete
- moving whole feature move
- moving specified vertex vertex
- adding new vertext to line/boundary break
- spliting line/boundary completely split
- merging two lines/boundaries together merge
- IMHO funtionality for adding 'z' values to vector contour lines should be back too
v.edit should accept feature selection by:
- bbox bbox
- catlist cats
- single coordinates coords
Examples of actions
- Create new vector file
v.edit tool=create map=vectfile
creates new vector map, eventualy will read data from standard inputs in default format (standard/point)
v.edit tool=create map=vectfile input=file.txt
creates new vector map and reads data from file file.txt in default format
- Add new feature to existing vector
v.edit tool=add map=vectfile
Read data from standard inputs in standard format
- Remove feature from vector file
v.edit tool=delete map=vectfile cat=34,24
Remove features with category 34 and 24 from file vectfile
v.edit tool=delete map=vectfile coords=344556.23,23445.2345
Remove feature located on coordinates 344556.23,23445.2345
v.edit tool=delete map=vectifle bbox=344556.23,234455.2345,567566.34,456455.34
Remove features defined by bounding box 344556.23,234455.2345,567566.34,456455.34
- Move feature
v.edit tool=move map=vectifle coords=344556.23,23445.2345 move=100000,-100000
Move feature located on coordinates 344556.23,23445.2345 to coordinates 644556.23,43445.2345
v.edit tool=move map=vectifle cat=45 move=1000,-1000
Move all points of feature of category 45 to coordinates about 1000 map units to the west and 1000 map units to the south
v.edit tool=move map=vectifle bbox=344556.23,234455.2345,567566.34,456455.34 to=1000,-1000
Move all points of features defined by bounding box 344556.23,234455.2345,567566.34,456455.34 about 1000 map units to the west and 1000 map units to the south
- Moving vertext
v.edit tool=vertex map=vectifile coords=344556.23,23445.2345 move=1000,-1000
Move vertex on coordinates 344556.23,23445.2345 to 545556.23,22445.2345
- Breaking line
v.edit tool=break map=vectifile coords=344556.23,23445.2345
Break line on coordinates 344556.23,23445.2345 at coords 345433.3,34567.32
v.edit tool=break map=vectifile cat=45 coords=345433.3,34567.32
Break line of category 45 at coords 345433.3,34567.32
- Spliting line
v.edit tool=split map=vectifile coords=344556.23,23445.2345
Split line on coordinates 344556.23,23445.2345 at coords 345433.3,34567.32
v.edit tool=split map=vectifile cat=45 coords=345433.3,34567.32
Split line of category 45 at coords 345433.3,34567.32
- Mergin two lines
v.edit tool=merge map=vectfile coords=606853.875,4921332,603216.75,4922763
Merge first line defined by coordinates 606853.875,4921332 with second line, defined by coordinates 603216.75,4922763. Define nearest distance between line first and last points and move first (last) point of second line to first line -- First line will remain untached.
v.edit tool=merge map=vectfile bbox=344556.23,23445.2345
Merge two lines defined by bounding box
v.edit tool=merge map=vectfile cat=43,45
Merge two lines defined by category
Summary
v.edit --help Description: Edits a vector map; allows adding, deleting and modifying objects in a vector map. Keywords: vector, editing Usage: v.edit [-tdbcn] map=name tool=string [input=string] [cats=range] [coords=x,y[,x,y,...]] [move=x,y] [bbox=x1,y1,x2,y2] [snap=value] [layer=value] [--verbose] [--quiet] Flags: -t Do not use topology. -d No database updates. -b Give cats to boundaries too. -c Do not close boundaries -n Don't expect a header --v Verbose module output --q Quiet module output Parameters: map Name of input vector map tool The edit tool to take. create - Create new vector file add - Add new vector feature to existing vector file delete - Delete feature from vector file move - Move feature in vector file vertex - Move just only vertex straight - Remove vertex merge - Merge two vector lines togher break - Add new vertex to existing vector line split - Split line into two separate lines options: create,add,delete,move,vertex,straight,merge,break,split input ASCII file to be converted to binary vector file, if not given reads from standard input cats Category values Example: 1,3,7-9,13 coords An x,y list of points. Required for add and move actions. move Difference in x,y direction for moving feature or vertex bbox Bounding box of selected feature snap Object points will snap to existing points within snap units. default: 5.0 layer Layer number A single vector map can be connected to multiple database tables. This number determines which table to use. default: 1
r.digit
The r.in.poly ascii format is almost the same as the standard vector ascii format. So the new digitizer should be able to output for both, and then we have a replacement for r.digit too!