Difference between revisions of "GRASS Digitizing tool"

From GRASS-Wiki
Jump to: navigation, search
(v.edit)
Line 11: Line 11:
 
=v.edit=
 
=v.edit=
 
GRASS graphical digitising tool should be graphical front-end for new v.edit module. v.edit should be CML tool for  
 
GRASS graphical digitising tool should be graphical front-end for new v.edit module. v.edit should be CML tool for  
* adding new features (points, lines, polylines, centroids)
+
* creating new vector file, eventualy overwrite existing ones '''create'''
* removenig old features (with database record)
+
* adding new features (points, lines, polylines, centroids) '''add'''
* moving whole feature  
+
* removenig old features (with database record) '''delete'''
* moving specified vertex
+
* moving whole feature '''move'''
* spliting new vertex between two existing ones
+
* moving specified vertex '''movevertex'''
 +
* adding new vertext to line/boundary '''break'''
 +
* spliting line/boundary completely '''split'''
 
* IMHO funtionality for adding 'z' values to vector contour lines should be back too
 
* IMHO funtionality for adding 'z' values to vector contour lines should be back too
  
 
v.edit should accept feature selection by:
 
v.edit should accept feature selection by:
* bbox
+
* bbox '''bbox'''
* catlist
+
* catlist '''cats'''
* single coordinates
+
* single coordinates '''coords'''
  
==v.edit input types==
+
==Examples of actions==
v.edit should accept inputs in following formats (based on v.in.acii):
+
* Create new vector file
=== For adding new features===
+
v.edit tool=create map=vectfile
* point
+
creates new vector map, eventualy will read data from standard inputs in default format (standard/point)
e.g.  
+
v.edit tool=create map=vectfile input=file.txt
x|y|z
+
creates new vector map and reads data from file file.txt in default format
10|20|30
 
* standard
 
e.g.
 
L 1
 
10 20 30
 
20 30 40
 
1
 
===For removing existing features===
 
* list of categories with specified separator
 
* coordinate pair
 
x,y
 
* bounding box
 
x1,y1,x2,y2
 
  
===For moving existing feature===
+
* Add new feature to existing vector
Feature identification like for removing existing featuer
+
v.edit tool=add map=vectfile format=standard
* Dx,Dy
+
Read data from standard inputs in standard format
* new x,y of first node
+
v.edit tool=add map=vectfile input=file.txt format=point
 +
Reads data from file file.txt in point format
  
===For breaking line===
+
* Remove feature from vector file
* x,y
+
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
  
===For moving vertex===
+
* Move feature
* identification by x,y
+
v.edit tool=move map=vectifle coords=344556.23,23445.2345 to=544556.23,53445.2345
* moving like moving of whole feature
+
Move feature located on coordinates 344556.23,23445.2345 to coordinates 544556.23,53445.2345
 +
v.edit tool=move map=vectifle cat=45 to=544556.23,53445.2345
 +
Move feature of category 45 to coordinates 544556.23,53445.2345
 +
v.edit tool=move map=vectifle bbox=344556.23,234455.2345,567566.34,456455.34 to=544556.23,53445.2345
 +
Move all features in defined by bounding box 344556.23,234455.2345,567566.34,456455.34 to 544556.23,53445.2345 (down-left corner of the bbox)
 +
 
 +
* Moving vertext
 +
v.edit tool=movevertex map=vectifile coords=344556.23,23445.2345 to=544556.23,53445.2345
 +
Move vertex on coordinates 344556.23,23445.2345 to 544556.23,53445.2345
 +
 
 +
* Breaking line
 +
v.edit tool=break map=vectifile coords=344556.23,23445.2345 at=345433.3,34567.32
 +
Break line on coordinates 344556.23,23445.2345 at coords 345433.3,34567.32
 +
v.edit tool=break map=vectifile cat=45 at=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 at=345433.3,34567.32
 +
Split line on coordinates 344556.23,23445.2345 at coords 345433.3,34567.32
 +
v.edit tool=split map=vectifile cat=45 at=345433.3,34567.32
 +
Split line of category 45 at coords 345433.3,34567.32
 +
 
 +
==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 [-tdc] map=name tool=string [input=file] [cats=range]
 +
    [coords=x,y[,x,y,...]] [to=x,y] [at=x,y] [bbox=x,y,x,y]
 +
    [--verbose] [--quiet]
 +
 +
Flags:
 +
  -t  Do not build topology.
 +
  -d  No database updates.
 +
  -c  Do not close boundaries
 +
  --v  Verbose module output
 +
  --q  Quiet module output
 +
 +
Parameters:
 +
      map  Name of input vector map
 +
    tool  The edit action to take.
 +
            options: create,add,delete,move,movevertex,break,split
 +
            create: creates new vector file
 +
            add: add new features to existing vector file
 +
            delete: delete feature from existing vector file
 +
            move: move whole feature
 +
            movevertex: move just one vertex of the feature
 +
            break: add new vertex to feature
 +
            split: split feature
 +
    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
 +
      to  New location of the feature
 +
      at  Coordinates of breaking or spliting feature
 +
    bbox  Bounding box in form x1,y1,x2,y2

Revision as of 00:06, 8 December 2006

v.digit

GRASS digitizing tool should be

  • written in Python 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 movevertex
  • adding new vertext to line/boundary break
  • spliting line/boundary completely split
  • 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 format=standard

Read data from standard inputs in standard format

v.edit tool=add map=vectfile input=file.txt format=point

Reads data from file file.txt in point 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 to=544556.23,53445.2345

Move feature located on coordinates 344556.23,23445.2345 to coordinates 544556.23,53445.2345

v.edit tool=move map=vectifle cat=45 to=544556.23,53445.2345

Move feature of category 45 to coordinates 544556.23,53445.2345

v.edit tool=move map=vectifle bbox=344556.23,234455.2345,567566.34,456455.34 to=544556.23,53445.2345

Move all features in defined by bounding box 344556.23,234455.2345,567566.34,456455.34 to 544556.23,53445.2345 (down-left corner of the bbox)

  • Moving vertext
v.edit tool=movevertex map=vectifile coords=344556.23,23445.2345 to=544556.23,53445.2345

Move vertex on coordinates 344556.23,23445.2345 to 544556.23,53445.2345

  • Breaking line
v.edit tool=break map=vectifile coords=344556.23,23445.2345 at=345433.3,34567.32

Break line on coordinates 344556.23,23445.2345 at coords 345433.3,34567.32

v.edit tool=break map=vectifile cat=45 at=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 at=345433.3,34567.32

Split line on coordinates 344556.23,23445.2345 at coords 345433.3,34567.32

v.edit tool=split map=vectifile cat=45 at=345433.3,34567.32

Split line of category 45 at coords 345433.3,34567.32

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 [-tdc] map=name tool=string [input=file] [cats=range] 
    [coords=x,y[,x,y,...]] [to=x,y] [at=x,y] [bbox=x,y,x,y] 
    [--verbose] [--quiet]

Flags:
  -t   Do not build topology.
  -d   No database updates.
  -c   Do not close boundaries
 --v   Verbose module output
 --q   Quiet module output

Parameters:
     map   Name of input vector map
    tool   The edit action to take.
           options: create,add,delete,move,movevertex,break,split
           create: creates new vector file
           add: add new features to existing vector file
           delete: delete feature from existing vector file
           move: move whole feature
           movevertex: move just one vertex of the feature
           break: add new vertex to feature
           split: split feature
   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
      to   New location of the feature
      at   Coordinates of breaking or spliting feature
    bbox   Bounding box in form x1,y1,x2,y2