[GRASSweb-list]markus: web/grass51 examples.html,1.7,1.8 index.html,1.34,1.35

grass at intevation.de grass at intevation.de
Tue Nov 5 10:38:00 EST 2002


Author: markus

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

Modified Files:
	examples.html index.html 
Log Message:
a bit more

Index: examples.html
===================================================================
RCS file: /grassrepository/web/grass51/examples.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- examples.html	5 Nov 2002 13:33:55 -0000	1.7
+++ examples.html	5 Nov 2002 15:37:57 -0000	1.8
@@ -8,19 +8,24 @@
 <body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#59188E" alink="#FF0000">
 
 <font face="Arial, Helvetica">
-<h1>GRASS 5.1 Usage Examples</h1>
+<table width="100%" cellpadding="3" border="0">
+<tr><td align="left" bgcolor="#10ef40"><font color="#00000" face="Helvetica"><big><b>
+GRASS 5.1 Usage Examples
+</b></big></font></td></tr></table><p>
 
-GRASS 5.1 is currently under development. It is neighter complete (it still
+GRASS 5.1 is currently under development. It is neither complete (it still
 contains only a few modules) nor it is intended to productional usage. 
 Development releases are provided for people who want to help test, debug,
 and improve GRASS 5.1. Knowing this, please read on.
 <p>
 
-<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>
+<i><b>Disclaimer:</b> These examples described here may work or
+        not. You are kindly invited to send us further examples and/or
+        code bugfixes/enhancements.<i>
 <P>
 
-Do get debug information, set variable (set to 0 for debug silence):
+To get debug information, set variable (set to 0 for debug silence) to
+      1..5:
 <pre>
 export GRASS_DEBUG_LEVEL=5
 </pre>
@@ -338,12 +343,59 @@
 </b></big></font></td></tr></table>
 
 <pre>
-#Select from table 'markveggy' (in database 'grass51test') all rows where 'vegtype = "IFA"':
+#First we want to read from the DBF table:
+#NOTE: connections for db.* SQL commands (eg db.select...) are established with db.connect:
+db.connect driver=dbf database=/ssi0/ssi/neteler/grassdata/botswanaLL/shp
+
+#Select from table 'markveggy' (in database 'grass51test') all rows where 'VEGTYPE = "IFA"':
 #NOTE: string attributes must be quoted:
-echo "select * from markveggy where vegtype = 'IFA'" | db.select -ch
+echo "select VEGCNP_ID from markveggy where VEGTYPE = 'IFA'" | db.select -hc
+
+#NOTE: vector commands use connection(s) defined in DB file (see above):
+#add line
+markveggy.vegtype 1 markveggy VEGCNP_ID /ssi0/ssi/neteler/grassdata/botswanaLL/shp dbf
+
+#NOTE: for areas such selections only work when area centroids are present!
+d.erase
+d.vect markveggy.vegtype where="VEGTYPE = 'IFA'"
+d.what.vect -a
+
+############
+#Now connection to PostgreSQL through ODBC:
+db.connect driver=odbc database=grass51test
+echo "select VEGCNP_ID from markveggy where VEGTYPE = 'IFA'" | db.select -hc
+
+#add line to DB file to connect vector map
+markveggy.vegtype 1 markveggy VEGCNP_ID grass51test odbc
+
+#NOTE: for areas such selections only work when area centroids are present!
+d.erase
+d.vect markveggy.vegtype where="VEGTYPE = 'Wiii'"
+d.what.vect -a
 
-#to be cont'ed...
 </pre>
+
+<hr>
+<b>Further Links:</b>
+
+<ul>
+<li><a href=http://postgis.refractions.net/>PostGIS with shp2pgsql</a>:<br>
+          <tt>shp2pgsql -D lakespy2 lakespy2 test > lakespy2.sql</tt>
+<li><a href=http://www.klaban.torun.pl/prog/pg2xbase/>pg2xbase</a>
+                  (DBF <-> PostgreSQL)
+<li><a href=http://e00pg.sourceforge.net/>e002pg</a> (E00 to PostGIS
+                  filter)
+<li><a href=http://gdal.velocet.ca/projects/opengis/>ogrinfo and
+                    ogr2ogr</a> (GIS vector format converter and
+                  library, e.g. ArcInfo or SHAPE -> PostGIS)<br>
+          <tt>ogr2ogr -f "PostgreSQL" shapefile ??</tt>
+
+<li><a href=http://mdbtools.sourceforge.net/>mdbtools</a> (converts
+                  MS-ACCESS data to SQL, DBF etc.)<br>
+          <tt>gmdb dbfile.mdb</tt>
+<li><a href=http://www.unixodbc.org/>unixODBC</a> to connect GRASS 5.1
+                  to database servers such as PostgreSQL, Oracle etc.
+</ul>
 
 <!-- FOOTER -->
 <p>

Index: index.html
===================================================================
RCS file: /grassrepository/web/grass51/index.html,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- index.html	30 Oct 2002 16:55:34 -0000	1.34
+++ index.html	5 Nov 2002 15:37:57 -0000	1.35
@@ -16,7 +16,7 @@
 
 <h1><font face="Arial, Helvetica">GRASS 5.1 status</font></h1>
 
-GRASS 5.1 is currently under development. It is neighter complete (it still
+GRASS 5.1 is currently under development. It is neihter complete (it still
 contains only a few modules) nor it is intended to productional usage. 
 Development releases are provided for people who want to help test, debug,
 and improve GRASS 5.1. Knowing this, please read on.





More information about the grass-web mailing list