GRASS Digitizing tool: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
m (show new digitizer first)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=v.digit=
__TOC__
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.
== GUI vector digitizer ==


=v.edit=
=== New digitizer ===
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:
Quick overview:
* bbox '''bbox'''
* Editing of vector objects:
* catlist '''cats'''
** Add, Break, Copy, Connect, Convert Type, Delete, Flip direction, Merge, Move, Select lines by query, Snap, Split
* single coordinates '''coords'''
* Cats:
** Copy, Delete, Z-Bulk Labeling
* Vertex:
** Insert, Delete, Move


==Examples of actions==
* '''For details, see [[WxGUI#Vector_digitizer|Vector digitizer]] in [[wxGUI]]'''
* 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


[[Image:WxGUI-vdigit-win0.png|thumb|400px|center]]


* Remove feature from vector file
=== Old digitizer ===
v.edit tool=delete map=vectfile cat=34,24
* TCL/TK-based old fashioned [http://grass.osgeo.org/grass63/manuals/html63_user/v.digit.html v.digit] module
Remove features with category 34 and 24 from file vectfile
* no longer maintained
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
[[Image:V digit tcltk.png|thumb|400px|center]]
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
== Command Line (CLI) vector digitizer ==
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
See manual page of {{cmd|v.edit}}.
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


* Remove vertex -- straight line
== Raster digitizer ==
v.edit tool=straight map=vectifile coords=344556.23,23445.2345
Remove vertex at coordinates 344556.23,23445.2345


* Spliting line
The {{cmd|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 {{cmd|r.digit}} too!
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
[[Category:Development]]
v.edit tool=merge map=vectfile coords=606853.875,4921332,603216.75,4922763
[[Category:Vector]]
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!

Latest revision as of 15:33, 8 October 2012

GUI vector digitizer

New digitizer

Quick overview:

  • Editing of vector objects:
    • Add, Break, Copy, Connect, Convert Type, Delete, Flip direction, Merge, Move, Select lines by query, Snap, Split
  • Cats:
    • Copy, Delete, Z-Bulk Labeling
  • Vertex:
    • Insert, Delete, Move


Old digitizer

  • TCL/TK-based old fashioned v.digit module
  • no longer maintained

Command Line (CLI) vector digitizer

See manual page of v.edit.

Raster digitizer

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!