[GRASSweb-list]markus: web/grass51 examples.html,1.15,1.16

grass at intevation.de grass at intevation.de
Tue Dec 10 12:51:40 EST 2002

Author: markus

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

Modified Files:
Log Message:
new OR statement, new possibility to also display attributes with vector s (thanks to Alex and Radim)

Index: examples.html
RCS file: /grassrepository/web/grass51/examples.html,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- examples.html	3 Dec 2002 16:17:05 -0000	1.15
+++ examples.html	10 Dec 2002 17:51:38 -0000	1.16
@@ -146,6 +146,25 @@
 #note: strings must be quoted:
 v.extract markveggy.shp output=markveggy.1 where="VEGTYPE = 'PS'"
+#selection with OR:
+# Take care to use parenthesis on both sides of or ( otherwise the result m
+# be bogus). Single clause of one comparison should also be enclosed in
+# brackets standing on one of the sides of 'or' like in:
+#     select * from tab where (c1 < 5) or (c2 >1)
+v.extract markveggy.shp out=markveggy.1 new=1 where="(VEGTYPE = 'Wi') or (VEGTYPE = 'PS') or (PRIME_TYPE='Wi')"
+#to use the new map, you should link attributes to it. This can
+#be the table from the parent map. Edit the DB file and add a row for
+#the new map (here: markveggy.1)
+#Then, query new map:
+d.what.vect -a
+#Or you can display with labels attached to the vector: First we check
+# from which column labels to display:
+db.columns tab=markveggy
+d.vect markveggy.1 att=vegtype display=attr lcolor=red
 <p><table width="100%" cellpadding="3" border="0">
@@ -154,15 +173,15 @@
 Example: Vector map export data using OGR
-Export of GRASs 5.1 vector map to SHAPE format (generates /tmp/testogr.shp
-and related files):
+#Export of GRASS 5.1 vector map to SHAPE format (generates /tmp/testogr.shp
+#and related files):
 v.out.ogr input=multi typ=line dsn=/tmp layer=testogr
-Export to GML format (generates /tmp/testogr..gml file with layer 'testogr'):
+#Export to GML format (generates /tmp/testogr..gml file with layer 'testogr'):
 v.out.ogr input=multi typ=line dsn=/tmp/testogr.gml layer=testogr format=GML

More information about the grass-web mailing list