[GRASS-SVN] r53114 - in grass/branches/releasebranch_6_4/db/drivers: dbf mysql odbc ogr postgres sqlite
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 7 01:20:30 PDT 2012
Author: neteler
Date: 2012-09-07 01:20:29 -0700 (Fri, 07 Sep 2012)
New Revision: 53114
Modified:
grass/branches/releasebranch_6_4/db/drivers/dbf/grass-dbf.html
grass/branches/releasebranch_6_4/db/drivers/mysql/grass-mesql.html
grass/branches/releasebranch_6_4/db/drivers/mysql/grass-mysql.html
grass/branches/releasebranch_6_4/db/drivers/odbc/grass-odbc.html
grass/branches/releasebranch_6_4/db/drivers/ogr/grass-ogr.html
grass/branches/releasebranch_6_4/db/drivers/postgres/grass-pg.html
grass/branches/releasebranch_6_4/db/drivers/sqlite/grass-sqlite.html
Log:
db drivers: manual cleanup
Modified: grass/branches/releasebranch_6_4/db/drivers/dbf/grass-dbf.html
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/dbf/grass-dbf.html 2012-09-07 07:23:47 UTC (rev 53113)
+++ grass/branches/releasebranch_6_4/db/drivers/dbf/grass-dbf.html 2012-09-07 08:20:29 UTC (rev 53114)
@@ -115,7 +115,7 @@
</pre></div>
indicates that an unsupported SQL statement (here, 'IN') was used. The only
solution is to switch the DBMI backend to a real SQL engine (SQLite,
-PostgreSQL, MySQL etc.). See <a HREF="sql.html">SQL support in GRASS GIS</a>.
+PostgreSQL, MySQL etc.). See <a href="sql.html">SQL support in GRASS GIS</a>.
<p>
An error message such as:
@@ -133,13 +133,16 @@
<h2>SEE ALSO</h2>
<em>
-<a HREF="db.connect.html">db.connect</a>,
-<a HREF="sql.html">SQL support in GRASS GIS</a><br>
+<a href="db.connect.html">db.connect</a>,
+<a href="sql.html">SQL support in GRASS GIS</a><br>
<a href="http://shapelib.maptools.org/dbf_api.html">DBF Specifications</a> (Shapelib)
</em>
<p><i>Last changed: $Date$</i>
-<HR>
-<BR><a href=index.html>Help Index</a>
+<hr>
+<br>
+<a href="index.html">Main index</a> -
+<a href="database.html">database index</a> -
+<a href="full_index.html">full index</a>
</body>
</html>
Modified: grass/branches/releasebranch_6_4/db/drivers/mysql/grass-mesql.html
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/mysql/grass-mesql.html 2012-09-07 07:23:47 UTC (rev 53113)
+++ grass/branches/releasebranch_6_4/db/drivers/mysql/grass-mesql.html 2012-09-07 08:20:29 UTC (rev 53114)
@@ -15,7 +15,6 @@
MySQL database driver in GRASS enables GRASS to store vector
attributes in MySQL embedded database without necessity
to run MySQL server.
-<p>
<h2>Driver and database name</h2>
GRASS modules require 2 parameters to connect to a database.
@@ -34,15 +33,14 @@
<p>
Examples of connection parameters:
-<pre>
- db.connect driver=mesql database='$GISDBASE/$LOCATION_NAME/$MAPSET/mysql'
- db.connect driver=mesql database=/home/user1/db
-</pre>
+<div class="code"><pre>
+db.connect driver=mesql database='$GISDBASE/$LOCATION_NAME/$MAPSET/mysql'
+db.connect driver=mesql database=/home/user1/db
+</pre></div>
<h2>Data types, indexes</h2>
For more information about supported data types and indexes
-see the documentation for
-<a href="grass-mysql.html">MySQL (mysql) driver</a>
+see the documentation for <a href="grass-mysql.html">MySQL (mysql) driver</a>.
<h2>Database type</h2>
Because database closing was found very slow if InnoDB was used,
@@ -52,24 +50,28 @@
<h2>Note</h2>
The embedded server is started with hardcoded '--bootstrap'
option to avoid warning about missing
-mysql.time_zone_leap_second table. This can be fixed in future.
+"mysql.time_zone_leap_second table". This can be fixed in future.
<h2>SEE ALSO</h2>
<em>
-<a HREF="db.connect.html">db.connect</a>,
-<a HREF="sql.html">SQL support in GRASS GIS</a></em>
+<a href="db.connect.html">db.connect</a>,
+<a href="sql.html">SQL support in GRASS GIS</a>
+</em>
<h2>Credits</h2>
Development of the driver was sponsored by
<a href="http://www.faunalia.it">Faunalia</a> (Italy)
as part of a project for <a href="http://www.atac.roma.it/">ATAC</a>.
-<H2>AUTHOR</H2>
+<h2>AUTHOR</h2>
Radim Blazek
<p><i>Last changed: $Date$</i>
-<HR>
-<BR><a href=index.html>Help Index</a>
+<hr>
+<br>
+<a href="index.html">Main index</a> -
+<a href="database.html">database index</a> -
+<a href="full_index.html">full index</a>
</body>
</html>
Modified: grass/branches/releasebranch_6_4/db/drivers/mysql/grass-mysql.html
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/mysql/grass-mysql.html 2012-09-07 07:23:47 UTC (rev 53113)
+++ grass/branches/releasebranch_6_4/db/drivers/mysql/grass-mysql.html 2012-09-07 08:20:29 UTC (rev 53114)
@@ -20,7 +20,7 @@
name of the table is the same as the name of the vector it is
good practice to create a new database for each GRASS mapset.
-<H2>Creating a MySQL database</H2>
+<h2>Creating a MySQL database</h2>
A new database is created within MySQL:
@@ -108,19 +108,23 @@
<h2>SEE ALSO</h2>
<em>
-<a HREF="db.connect.html">db.connect</a>,
-<a HREF="sql.html">SQL support in GRASS GIS</a></em>
+<a href="db.connect.html">db.connect</a>,
+<a href="sql.html">SQL support in GRASS GIS</a>
+</em>
<h2>Credits</h2>
Development of the driver was sponsored by
<a href="http://www.faunalia.it">Faunalia</a> (Italy)
as part of a project for <a href="http://www.atac.roma.it/">ATAC</a>.
-<H2>AUTHOR</H2>
+<h2>AUTHOR</h2>
Radim Blazek
<p><i>Last changed: $Date$</i>
-<HR>
-<BR><a href=index.html>Help Index</a>
+<hr>
+<br>
+<a href="index.html">Main index</a> -
+<a href="database.html">database index</a> -
+<a href="full_index.html">full index</a>
</body>
</html>
Modified: grass/branches/releasebranch_6_4/db/drivers/odbc/grass-odbc.html
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/odbc/grass-odbc.html 2012-09-07 07:23:47 UTC (rev 53113)
+++ grass/branches/releasebranch_6_4/db/drivers/odbc/grass-odbc.html 2012-09-07 08:20:29 UTC (rev 53114)
@@ -44,37 +44,48 @@
</table>
-<H2>Supported SQL commands</H2>
+<h2>Supported SQL commands</h2>
All SQL commands supported by ODBC.
-<H2>Operators available in conditions</H2>
+<h2>Operators available in conditions</h2>
All SQL operators supported by ODBC.
-<H2>EXAMPLE</H2>
+<h2>EXAMPLE</h2>
In this example we copy the dbf file of a SHAPE map into ODBC, then connect
GRASS to the ODBC DBMS. Usually the table will be already present in the
DBMS.
-<ul>
-<li>
+<h3>Defining the ODBC connection</h3>
+
+<h4>MS-Windows</h4>
+On MS-Windows, in order to be able to connect, the ODBC connection
+needs to be configured using dedicated tools (tool called "ODBC Data Source
+Administrator") and give a name to that connection. This name is then used
+as database name when accessing from a client via ODBC.
+
+<h4>Linux</h4>
+
Configure ODBC driver for selected database (manually or with 'ODBCConfig').
-ODBC drivers are defined in /etc/odbcinst.ini. Here is example:</li>
-
+ODBC drivers are defined in /etc/odbcinst.ini. Here an example:
+<p>
<div class="code"><pre>
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
- FileUsage = 1</pre></div>
+ FileUsage = 1
+</pre></div>
-<li> Create DSN (data source name). The DSN is used as database name in db.*
+<p>
+Create DSN (data source name). The DSN is used as database name in db.*
modules. Then DSN must be defined in $HOME/.odbc.ini (for this user only) or in
/etc/odbc.ini for (for all users) [watch out for the database name which
appears twice and also for the PostgreSQL protocol version]. Omit blanks at
-the beginning of lines:</li>
+the beginning of lines:
+<p>
<div class="code"><pre>
[grass6test]
@@ -97,7 +108,8 @@
FakeOidIndex = No
ConnSettings =</pre></div>
-Configuration of an DSN without GUI is described on <a href="http://www.unixodbc.org/odbcinst.html">http://www.unixodbc.org/odbcinst.html</a>,
+Configuration of an DSN without GUI is described on
+<a href="http://www.unixodbc.org/odbcinst.html">http://www.unixodbc.org/odbcinst.html</a>,
but odbc.ini and .odbc.ini may be created by the 'ODBCConfig' tool. You can
easily view your DSN structure by 'DataManager'. Configuration with
GUI is described on <a href="http://www.unixodbc.org/doc/UserManual/">http://www.unixodbc.org/doc/UserManual/</a>
@@ -108,63 +120,71 @@
</pre></div>
-<li>
+<h3>Using the ODBC driver</h3>
+
Now create a new database if not yet existing:
+<p>
<div class="code"><pre>
db.createdb driver=odbc database=grass6test
</pre></div>
-
-</li><li>Now store the table 'mytable.dbf' (here: in current directory) into PostgreSQL
-through ODBC:
+<p>
+To store a table 'mytable.dbf' (here: in current directory) into
+PostgreSQL through ODBC, run:
+<p>
<div class="code"><pre>
db.connect driver=odbc database=grass6test
db.copy from_driver=dbf from_database=./ from_table=mytable \
to_driver=odbc to_database=grass6test to_table=mytable
</pre></div>
-
-</li><li> Next link map to attribute table (now the ODBC table is used, not the dbf file):
-
+<p>
+Next link the map to the attribute table (now the ODBC table
+is used, not the dbf file):
+<p>
<div class="code"><pre>
v.db.connect map=mytable.shp table=mytable key=ID \
database=grass6test driver=odbc
v.db.connect -p
</pre></div>
-
-</li><li>
+<p>
Finally a test: Here we should see the table columns (if the ODBC connection works):
<div class="code"><pre>
db.tables -p
db.columns table=mytable
-
</pre></div>
+<p>
Now the table name 'mytable' should appear.
-<BR>
+<br>
Doesn't work? Check with 'isql <databasename>' if the ODBC-PostgreSQL
connection is really established.
-</li></ul>
+<p>
Note that you can also connect mySQL, Oracle etc. through ODBC to GRASS.
-
+<p>
You can also check the vector map itself concerning a current link to a
table:
-
+<p>
<div class="code"><pre>
v.db.connect -p mytable.shp
</pre></div>
-
+<p>
which should print the database connection through ODBC to the defined RDBMS.
-<H2>SEE ALSO</H2>
+<h2>SEE ALSO</h2>
<em>
-<a HREF="db.connect.html">db.connect</a>,
-<a HREF="v.db.connect.html">v.db.connect</a>,
+<a href="db.connect.html">db.connect</a>,
+<a href="v.db.connect.html">v.db.connect</a>,
<a href="http://www.unixODBC.org">unixODBC web site</a>,
-<a HREF="sql.html">SQL support in GRASS GIS</a></em>
+<a href="sql.html">SQL support in GRASS GIS</a>
+</em>
<p>
<i>Last changed: $Date$</i>
-<HR>
-<BR><a href=index.html>Help Index</a>
+
+<hr>
+<br>
+<a href="index.html">Main index</a> -
+<a href="database.html">database index</a> -
+<a href="full_index.html">full index</a>
</body>
</html>
Modified: grass/branches/releasebranch_6_4/db/drivers/ogr/grass-ogr.html
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/ogr/grass-ogr.html 2012-09-07 07:23:47 UTC (rev 53113)
+++ grass/branches/releasebranch_6_4/db/drivers/ogr/grass-ogr.html 2012-09-07 08:20:29 UTC (rev 53114)
@@ -17,11 +17,16 @@
<h2>SEE ALSO</h2>
-<em><a HREF="sql.html">SQL support in GRASS GIS</a></em>,
-<em><A HREF="v.external.html">v.external</A></em>
+<em>
+<a href="sql.html">SQL support in GRASS GIS</a>,
+<a href="v.external.html">v.external</a>
+</em>
<p><i>Last changed: $Date$</i>
-<HR>
-<BR><a href=index.html>Help Index</a>
+<hr>
+<br>
+<a href="index.html">Main index</a> -
+<a href="database.html">database index</a> -
+<a href="full_index.html">full index</a>
</body>
</html>
Modified: grass/branches/releasebranch_6_4/db/drivers/postgres/grass-pg.html
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/postgres/grass-pg.html 2012-09-07 07:23:47 UTC (rev 53113)
+++ grass/branches/releasebranch_6_4/db/drivers/postgres/grass-pg.html 2012-09-07 08:20:29 UTC (rev 53114)
@@ -13,14 +13,14 @@
<!-- meta page description: PostgreSQL driver -->
<h1>PostgreSQL driver in GRASS</h1>
-The driver name is 'pg'.
+The driver name in GRASS is 'pg'.
-<H2>Creating a PostgreSQL database</H2>
+<h2>Creating a PostgreSQL database</h2>
A new database is created with 'createdb', see the PostgreSQL manual
for details.
-<H2>Connecting GRASS to PostgreSQL</H2>
+<h2>Connecting GRASS to PostgreSQL</h2>
<div class="code"><pre>
# example for connecting to a PostgreSQL server:
@@ -32,19 +32,19 @@
</pre></div>
-<H2>Supported SQL commands</H2>
+<h2>Supported SQL commands</h2>
All SQL commands supported by PostgreSQL.
-It's not possible to use C-like escapes (with backslash like \n etc) within SQL syntax.
+It's not possible to use C-like escapes (with backslash like \n etc)
+within the SQL syntax.
-<H2>Operators available in conditions</H2>
+<h2>Operators available in conditions</h2>
All SQL operators supported by PostgreSQL.
+<h2>Adding an unique ID column</h2>
-<H2>Adding an unique ID column</H2>
-
Import vector module require an unique ID column which can
be generated as follows in a PostgreSQL table:
@@ -58,7 +58,7 @@
</pre></div>
-<h2>Attribute Converters</h2>
+<h2>Attribute import into PostgreSQL</h2>
CSV import into PostgreSQL:
<div class="code"><pre>
@@ -66,18 +66,14 @@
COPY t1 FROM 'filename' USING DELIMITERS ',';
</pre></div>
-<a href=http://www.klaban.torun.pl/prog/pg2xbase/>pg2xbase</a>:
-DBF to PostgreSQL converter.
-<BR>
+<h2>Geometry import from PostgreSQL table into GRASS</h2>
-<h2>Geometry import from PostgreSQL table</h2>
-
<em>v.in.db</em> creates a new vector (points) map from a database table
containing coordinates. See <a href="v.in.db.html">here</a> for examples.
<h2>PostGIS: PostgreSQL with vector geometry</h2>
-<a href=http://postgis.refractions.net/>PostGIS</a>:
+<a href="http://postgis.refractions.net/">PostGIS</a>:
adds geographic object support to PostgreSQL.
<h3>Example: Import from PostGIS</h3>
@@ -115,43 +111,42 @@
<h4>Geometry Converters</h4>
<ul>
-<li><a href=http://postgis.refractions.net/download/>PostGIS with shp2pgsql</a>:<br>
+<li><a href="http://postgis.refractions.net/download/">PostGIS with shp2pgsql</a>:<br>
<tt>shp2pgsql -D lakespy2 lakespy2 test > lakespy2.sql</tt>
-<BR><BR>
-<li><a href=http://e00pg.sourceforge.net/>e00pg</a>: E00 to PostGIS filter,
+<p>
+<li><a href="http://e00pg.sourceforge.net/">e00pg</a>: E00 to PostGIS filter,
see also <em><a href="v.in.e00.html">v.in.e00</a></em>.
-<BR><BR>
-<li>GDAL/OGR <a href=http://www.gdal.org/ogr/>ogrinfo and ogr2ogr</a>:
+<p>
+<li>GDAL/OGR <a href="http://www.gdal.org/ogr/">ogrinfo and ogr2ogr</a>:
GIS vector format converter and library, e.g. ArcInfo or SHAPE to PostGIS.<br>
<tt>ogr2ogr -f "PostgreSQL" shapefile ??</tt>
-<BR><BR>
+<p>
</ul>
-<H2>SEE ALSO</H2>
+<h2>SEE ALSO</h2>
<em>
-<a HREF="db.connect.html">db.connect</a>,
-<a HREF="db.execute.html">db.execute</a>,<BR>
-<a HREF="databaseintro.html">Database management in GRASS GIS</a>,<BR>
-<a HREF="database.html">Help pages for database modules</a>,<BR>
-<a HREF="sql.html">SQL support in GRASS GIS</a>
+<a href="db.connect.html">db.connect</a>,
+<a href="db.execute.html">db.execute</a>,<br>
+<a href="databaseintro.html">Database management in GRASS GIS</a>,<br>
+<a href="database.html">Help pages for database modules</a>,<br>
+<a href="sql.html">SQL support in GRASS GIS</a>
</em>
-<BR><BR>
+<p>
<em>
-<a href="http://www.PostgreSQL.org">PostgreSQL web site</a>,<BR>
+<a href="http://www.postgresql.org/">PostgreSQL web site</a>,<br>
<a href="http://www.pgadmin.org/">pgAdmin graphical user interface</a>
<p>
-Book: <a href="http://www.postgresql.org/docs/books/awbook.html">PostgreSQL:
- Introduction and Concepts</a> by Bruce Momjian<BR>
-<a href="http://www.postgresql.org/docs/">PostgreSQL Documentation</a><BR>
-<a href="http://techdocs.postgresql.org/">PostgreSQL Technical Documentation</a><BR>
-<a href="http://www.gdal.org/ogr/drv_pg.html">GDAL/OGR PostgreSQL driver documentation</a><BR>
-<a href="http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MapServerWiki">MapServer Wiki</a>
+<a href="http://www.gdal.org/ogr/drv_pg.html">GDAL/OGR PostgreSQL driver
+documentation</a>
</em>
-<p><i>Last changed: $Date$</i></p>
-<HR>
-<BR><a href=index.html>Help Index</a>
+<p><i>Last changed: $Date$</i>
+<hr>
+<br>
+<a href="index.html">Main index</a> -
+<a href="database.html">database index</a> -
+<a href="full_index.html">full index</a>
</body>
</html>
Modified: grass/branches/releasebranch_6_4/db/drivers/sqlite/grass-sqlite.html
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/sqlite/grass-sqlite.html 2012-09-07 07:23:47 UTC (rev 53113)
+++ grass/branches/releasebranch_6_4/db/drivers/sqlite/grass-sqlite.html 2012-09-07 08:20:29 UTC (rev 53114)
@@ -90,6 +90,9 @@
<p>
<i>Last changed: $Date$</i>
<hr>
-<br><a href=index.html>Help Index</a>
+<br>
+<a href="index.html">Main index</a> -
+<a href="database.html">database index</a> -
+<a href="full_index.html">full index</a>
</body>
</html>
More information about the grass-commit
mailing list