[GRASSweb-list]markus: web/grass51/tutorial geom_storage.html,1.20,1.21 index.html,1.22,1.23

grass at intevation.de grass at intevation.de
Tue Oct 21 08:39:20 EDT 2003


Author: markus

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

Modified Files:
	geom_storage.html index.html 
Log Message:
use of v.in.db

Index: geom_storage.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/geom_storage.html,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- geom_storage.html	19 Sep 2003 10:00:07 -0000	1.20
+++ geom_storage.html	21 Oct 2003 12:39:18 -0000	1.21
@@ -255,7 +255,7 @@
 <p><table width="100%" cellpadding="3" border="0">
 <tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
 <a name="sites"></a>
-Generating vector geometry from spreadsheet table
+Generating vector geometry from spreadsheet or DBMS table
 <DIV ALIGN=right><a href="#sites">[UP]</a></DIV>
 </b></big></font></td></tr></table>
 
@@ -265,42 +265,52 @@
 present.
 <P>
 
-Here we assume to have a PostgreSQL table. The db.* modules allow us to
-select columns which are then piped into 'v.in.ascii'. That's it for
-generating the map. Then the 'dbln' file must be created to link the
-map to the attributes table (with 'v.db.connect'):
+Here we assume to have a PostgreSQL table with columns 'east', 'north', 'quota' (z)
+and some attribute columns.
 
-<div class="code"><pre>
-#define the connection for the db.* tools:
-db.connect driver=pg database="host=pgserver,dbname=grass51test,user=neteler"
+<!--
+  The db.* modules allow us to select columns which are then piped into 'v.in.ascii'. 
+  That's it for generating the map. Then the 'dbln' file must be created to link the
+  map to the attributes table (with 'v.db.connect'):
 
-#check if connection is established:
-echo "select * from pat_centraline " | db.select
+  <div class="code"><pre>
+  #define the connection for the db.* tools:
+  db.connect driver=pg database="host=pgserver,dbname=grass51test,user=neteler"
 
-#now let's be selective (-c suppresses the column names):
-echo "select east_gb,north_gb,quota_gb,codice from pat_centraline " | db.select -c
+  #check if connection is established:
+  echo "select * from pat_centraline " | db.select
 
-#... and generate the map (3D points here):
-echo "select east_gb,north_gb,quota_gb,codice from pat_centraline " | db.select -c \
+  #now let's be selective (-c suppresses the column names):
+  echo "select east_gb,north_gb,quota_gb,codice from pat_centraline " | db.select -c
+
+  #... and generate the map (3D points here):
+  echo "select east_gb,north_gb,quota_gb,codice from pat_centraline " | db.select -c \
      | v.in.ascii -z out=pat_centraline
 
-v.info pat_centraline
+  v.info pat_centraline
 
-#link map to attribute table
-v.db.connect map=pat_centraline table=pat_centraline key=codice \
+  #link map to attribute table
+  v.db.connect map=pat_centraline table=pat_centraline key=codice \
              database="host=pgserver,dbname=grass51test,user=neteler" driver=pg
-v.db.connect -p pat_centraline
+  v.db.connect -p pat_centraline
+  </pre></div>
+-->
+
+<div class="code"><pre>
+v.in.db driver=pg database="host=myserver.itc.it,dbname=mydb,user=name" \
+        table=meteostations x=east y=north z=quota  key=id output=meteostations
 </pre></div>
 
-Now we have linked the new vector map (native format now) to the attributes
-table in PostgreSQL. We can display and query some points:
+This command creates the new vector map (native format) with attributes table in a DBF file.
+<P>
+We can display and query some points:
 <div class="code"><pre>
-d.vect pat_centraline
+d.vect meteostations
 d.what.vect
 </pre></div>
 
 It will open a window showing the attributes for the selected point. If you have permissions
-to modify the table, you could even modify the attributes now in this popup-window.
+to modify the table, you could even modify the attributes now within this attribute popup-window.
 
 <p><table width="100%" cellpadding="3" border="0">
 <tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>

Index: index.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/index.html,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- index.html	19 Sep 2003 10:00:07 -0000	1.22
+++ index.html	21 Oct 2003 12:39:18 -0000	1.23
@@ -51,7 +51,7 @@
   <li><a href="geom_storage.html#PostGRASS">Geometry stored in external database (PostGRASS)
     using PostGIS</a>
   <li><a href="geom_storage.html#OGR">Geometry access through OGR</a>
-  <li><a href="geom_storage.html#sites">Generating vector geometry from spreadsheet table</a>
+  <li><a href="geom_storage.html#sites">Generating vector geometry from spreadsheet or DBMS table</a>
   <li><a href="geom_storage.html#sites2">Generating vector geometry from XY or XYZ file</a>
  </ol>
 





More information about the grass-web mailing list