[GRASSweb-list]markus: web/grass51 examples.html,1.2,1.3

grass at intevation.de grass at intevation.de
Thu Oct 31 12:29:18 EST 2002

Author: markus

Update of /grassrepository/web/grass51
In directory doto:/tmp/cvs-serv18154

Modified Files:
Log Message:
more 5.1 examples

Index: examples.html
RCS file: /grassrepository/web/grass51/examples.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- examples.html	30 Oct 2002 16:55:34 -0000	1.2
+++ examples.html	31 Oct 2002 17:29:16 -0000	1.3
@@ -19,6 +19,10 @@
 <i><b>Disclaimer:</b> These examples may work or not. You are kindly invited to send us
 further examples and/or code bugfixes/enhancements.<i>
 <h2>Following modules are available at time of this writing</h2>
 (see timestamp at bottom)
@@ -54,6 +58,8 @@
  Consider to run v.build:
      v.build markveggy.shp
+#WARNING: The DB file must probably be edited manually.
 #build pseudo-topology for SHAPE
  v.build markveggy.shp
@@ -79,7 +85,10 @@
 <h2>Example 2: Extract vector data from map to new map with SQL statements</h2>
-v.extract markveggy.shp output=markveggy.1 where="VEGTYPE = PS"
+db.connect database=/ssi0/ssi/neteler/grassdata/botswanaLL/shp
+#note: strings must be quoted:
+v.extract markveggy.shp output=markveggy.1 where="VEGTYPE = 'PS'"
@@ -99,11 +108,19 @@
 <h2>Example 4: Conversion of SHAPE map to GRASS 5.1 vector map</h2>
+#WARNING: don't try this at home.
 v.out.ascii markveggy.shp out=test1
 v.in.ascii test1 out=newmap
 v.info newmap
+#NOTE: this cannot work properly as SHAPE contains closed polygons
+#v.clean should be used etc...
+v.clean newmap out=newmap.clean tool=break,rmdupl
+d.vect newmap.clean ty=area,boundary col=red
 #we connect this map to the old DBF file:
 db.connect database=/ssi0/ssi/neteler/grassdata/botswanaLL/shp
 db.describe table=markveggy
@@ -116,6 +133,12 @@
 #if DB file not present, create it. Otherwise add the line:
 newmap 1 markveggy VEGCNP_ID /ssi0/ssi/neteler/grassdata/botswanaLL/PERMANENT/shp dbf
+#NOTE: it is sufficent to only write changed entries for 'KEY_COLUMN',
+# 'path' and 'driver' entries because unchanged entries are inherited
+# from the previous line(s). The full DB file make now contain:
+markveggy.shp 1 markveggy VEGCNP_ID /ssi0/ssi/neteler/grassdata/botswanaLL/PERMANENT/shp dbf
+newmap 1 markveggy
 #... which links map 'newmap' with field 1 to table 'markveggy' with CAT_COLUMN
 #'VEGCNP_ID' with the DBF file in directory '/ssi0/ssi...' using the 'dbf' driver
 #(yes, we need an DB file editor - do you write it for us?)
@@ -128,6 +151,14 @@
 d.vect newmap
 d.what.vect newmap
+<h2>Example 5: Export to GRASS 5.0</h2>
+v.out.ascii -o newmap.clean out=newmap.clean
+Then go to 5.0 and run v.in.ascii + v.support.
 <!-- FOOTER -->

More information about the grass-web mailing list