GRASS Digitizing tool: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
Line 34: Line 34:


* Add new feature to existing vector
* Add new feature to existing vector
  v.edit tool=add map=vectfile format=standard
  v.edit tool=add map=vectfile
Read data from standard inputs in standard format
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
* Remove feature from vector file
Line 60: Line 59:


* Breaking line
* Breaking line
  v.edit tool=break map=vectifile coords=344556.23,23445.2345 at=345433.3,34567.32
  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
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
  v.edit tool=break map=vectifile cat=45 coords=345433.3,34567.32
Break line of category 45 at coords 345433.3,34567.32
Break line of category 45 at coords 345433.3,34567.32


* Spliting line
* Spliting line
  v.edit tool=split map=vectifile coords=344556.23,23445.2345 at=345433.3,34567.32
  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
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
  v.edit tool=split map=vectifile cat=45 coords=345433.3,34567.32
Split line of category 45 at 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==
==Summary==

Revision as of 21:35, 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 [-tdc] map=name tool=string [input=file] [cats=range] 
    [coords=x,y[,x,y,...]] [move=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
           vertex: move just one vertex of the feature
           merge:  merge two vector lines together
           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
    move   New location of the feature
      at   Coordinates of breaking or spliting feature
    bbox   Bounding box in form x1,y1,x2,y2

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!