[GRASSweb-list]markus: web/grass51/tutorial examples.html,1.3,1.4
grass at intevation.de
grass at intevation.de
Fri Jan 17 12:37:47 EST 2003
Author: markus
Update of /grassrepository/web/grass51/tutorial
In directory doto:/tmp/cvs-serv6862
Modified Files:
examples.html
Log Message:
new example: db.copy - Example: Copying a database table from one DBMS to another within GRASS 5.1
Index: examples.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/examples.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- examples.html 13 Jan 2003 18:10:38 -0000 1.3
+++ examples.html 17 Jan 2003 17:37:45 -0000 1.4
@@ -47,17 +47,17 @@
<ul>
<li>d.erase d.m d.mon d.path d.rast d.vect d.what.vect d.zoom
-<li>db.columns db.createdb db.describe db.dropdb db.execute db.tables
- db.connect db.databases db.drivers db.droptable db.select
-<li>g.gisenv g.mapsets g.region
+<li>db.columns db.copy db.createdb db.describe db.dropdb db.execute
+ db.tables db.connect db.databases db.drivers db.droptable db.select
+<li>g.gisenv g.mapsets g.region
<li>nviz
-<li>v.build v.digit v.clean.test v.in.ascii v.rand.poly
- v.topo.check v.build.polylines v.convert v.info v.shape.register
- v.category v.db.connect v.digit v.out.ascii v.patch v.shape.unregister
- v.clean v.extract v.out.ogr v.surf.rst
+<li>v.build v.digit v.clean.test v.in.ascii v.rand.poly v.topo.check
+ v.build.polylines v.convert v.info v.shape.register v.category
+ v.db.connect v.digit v.out.ascii v.patch v.shape.unregister v.clean
+ v.extract v.out.ogr v.surf.rst
<li>
If you start a module just by name, a related <a
- href=http://mpa.itc.it/radim/g51/d.vect-gui.jpg>GUI window pops up</a>.
+ href=http://mpa.itc.it/radim/g51/d.vect-gui.jpg>GUI window pops up</a>.
<li>
d.m is a new <a href=http://mpa.itc.it/radim/g51/d.m.jpg>display manager</a>.
</ul>
@@ -74,7 +74,9 @@
<li><a href="#SQL_queries">Example: SQL queries</a>
<li><a href="#shape_conversion">Example: Conversion of SHAPE map to GRASS
5.1 vector map</a>
-<li><a href="#map_from_points">Example: Generating a vector map from a point data
+<li><a href="#map_from_points">Example: Generating a vector map from a point
+ data</a>
+<li><a href="#db_copy">Example: Copying a database table from one DBMS to another within GRASS 5.1
table</a>
</ol>
@@ -346,6 +348,32 @@
</div></pre>
Cheers.
+
+<p><table width="100%" cellpadding="3" border="0">
+<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
+<a name="db_copy"></a>
+Example: Copying a database table from one DBMS to another within GRASS 5.1
+</b></big></font></td></tr></table>
+
+Here we copy a DBF file from current directory into a PostgreSQL database
+table on machine 'pgserver':
+
+<div class="code"><pre>
+db.copy from_driver=dbf from_database=./ from_table=census1990wet \
+ to_driver=pg to_database=host=pgserver,dbname=grass51test \
+ to_table=census1990wetB
+</div></pre>
+
+Simultaneously we can watch the data arriving in PostgreSQL (launch select
+command several times):
+
+<div class="code"><pre>
+psql -h pgserver
+grass51test=> select count(*) from census1990wetB;
+</div></pre>
+
+This may take some time depending on network speed and table size.
+
<hr>
<b>Further Links:</b>
More information about the grass-web
mailing list