[GRASSweb-list]markus: web/grass51/tutorial techdocs.html,NONE,1.1 attrib_storage.html,1.11,1.12 demo.html,1.5,1.6 examples.html,1.15,1.16 geom_storage.html,1.8,1.9 index.html,1.10,1.11 troubleshooting.html,1.1,1.2
grass at intevation.de
grass at intevation.de
Mon Feb 10 12:32:28 EST 2003
Author: markus
Update of /grassrepository/web/grass51/tutorial
In directory doto:/tmp/cvs-serv23892
Modified Files:
attrib_storage.html demo.html examples.html geom_storage.html
index.html troubleshooting.html
Added Files:
techdocs.html
Log Message:
some cleanup according to the latest 5.1 changes
--- NEW FILE: techdocs.html ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<DEFANGED_meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<DEFANGED_meta name="Author" content="Markus Neteler">
<DEFANGED_link rel="stylesheet" type="text/css" href="../../sitestyle.css">
<title>GRASS 5.1: Attribute management with connections to DBMS</title>
</head>
<body>
<!-- HEADER -->
<table width=100%><tr><td width=80>
<A HREF="index.html">
<DEFANGED_IMG src="../../images/grass.smlogo.gif" alt="HOME" border="0" align=middle></A>
</td><td><H1>
GRASS 5.1: Attribute management with connections to DBMS
</H1></td></tr></table>
<!-- END OF HEADER -->
<hr>
<a href="index.html">Tutorial HOME</a> |
<a href="demo.html">Demo LOCATION</a> |
<a href="geom_storage.html">Geometry management</a> |
<a href="attrib_storage.html">Attribute management</a> |
<a href="examples.html">Usage Examples</a> |
<a href="links.html">Links</a>
<hr>
<i><b>README:</b>
GRASS 5.1 is currently under development. It is neither complete (it still
contains only a few modules) nor it is intended for productional usage.
Development releases are provided for people who want to help test, debug,
and improve GRASS 5.1. Knowing this, please read on.</i><br>
<i>
These examples described here may work or not. You are kindly invited to
send us further examples and/or code bugfixes/enhancements.</i>
<P>
<h3>Vector data 'dbln' file mechanism</h3>
The "normal" user does not have to care about this file.
The following text describes some API internals.
<center>
<DEFANGED_IMG src="51attributes.jpg" alt="GRASS 5.1 attributes model">
</center>
Each vector element may have none, one or more categories (cats). If many
cats are required, they are distinguished by different field numbers
(field). Records in a vector attribute table are linked to vector entities
by field and category number. The field number identifies a database table
and the category number identifies the table record. I.e. for unique
combination <tt>mapset + map + field + category</tt> exists one unique
combination <tt>driver + database + table + row</tt>.
When a definition defines more fields for one map i.e. in one
map the same vector features are linked to several attribute tables. <p>
For each pair <tt>field</tt> must be defined table, key column, database,
driver. This definition must be written to <tt>$MAPSET/vector/MAP/dbln</tt>
text file. Each row in <tt>dbln</tt> file contains names separated by spaces
in following order ([] - optional):
<pre>
field table [key [database [driver]]]
</pre>
If key, database or driver are omited (on second and higher row only) last
definition is used.
<p>
Wild cards * and ? may be used. Variables GISDBASE, $LOCATION, $FIELD may
be used in table, key, database and driver names.
Normally the <tt>dbln</tt> file is generated by GRASS.
<P>
<h3>Default settings</h3>
Default settings are defined in the file<BR>
<tt>$GISDBASE/$LOCATION_NAME/$MAPSET/VAR</tt>
<P>
If there is a 'dbln' file present for a vector map, it is used.
If a new map is generated, the VAR settings are used.
<hr>
<P>
Further <a href=links.html>Links</a> (related software, SQL reference etc).
<!-- FOOTER -->
<p>
<hr>
<DIV ALIGN=right>© 2003 Markus Neteler<br>
<a href="mailto:weblist at grass.itc.it">Comments</a> about this page | <a href="../../faq/index.html">FAQ</a> | <a href="../../download.html">Download</a> | <a href="../../support.html">Support</a> | <a href="../../gdp/index.html">Docs</a> | <a href="../../grassdevel.html">Programming</a> | Back <a href=index.html>5.1 Tutorial Home</a><br>
<i>Last change:
$Date: 2003/02/10 17:32:26 $
</i></DIV>
</body>
</html>
Index: attrib_storage.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/attrib_storage.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- attrib_storage.html 26 Jan 2003 12:07:20 -0000 1.11
+++ attrib_storage.html 10 Feb 2003 17:32:25 -0000 1.12
@@ -28,7 +28,7 @@
<i><b>README:</b>
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.
+contains only a few modules) nor it is intended for productional usage.
Development releases are provided for people who want to help test, debug,
and improve GRASS 5.1. Knowing this, please read on.</i><br>
<i>
@@ -70,51 +70,29 @@
writing following DBMI drivers for attribute storage are available:
<ul>
-<li>DBF file
+<li>DBF file (default)
<li>ODBC connected RDBMS (e.g. Oracle, mySQL, PostgreSQL etc)
<li>PostgreSQL database
<li>mySQL database
</ul>
The connection of a vector map to an attribute table (except for SHAPE) is
-defined in a <tt>dbln</tt> file. This file is a text file (ASCII) and must
-be created in the directory or the vector map (where 'head' and 'frmt'
-live). Each line in the DB file refers to a map. Wildcards and inheritance
-from previous lines is implemented. See some <tt>dbln</tt> file details <a
-href="http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass51/doc/vector/vector.html#attr">here</a>.
-
-<center>
-<DEFANGED_IMG src="51attributes.jpg" alt="GRASS 5.1 attributes model">
-</center>
-
-Each vector element may have none, one or more categories (cats). More cats
-are distinguished by field number (field). Records in a vector attribute
-table are linked to vector entities by field and category number. The field
-number identifies a database table and the category number identifies the
-table record. I.e. for unique combination <tt>mapset + map + field +
-category</tt> exists one unique combination <tt>driver + database + table +
-row</tt>.
-
-When a definition defines more fields for one map i.e. in one
-map the same vector features are linked to several attribute tables. <p>
-
-For each pair <tt>field</tt> must be defined table, key column, database,
-driver. This definition must be written to <tt>$MAPSET/vector/MAP/dbln</tt>
-text file. Each row in <tt>dbln</tt> file contains names separated by spaces
-in following order ([] - optional):
+internally defined in a <tt>dbln</tt> file (an ASCII file in the vector map
+directory). This file is created whem importing/converting a map into GRASS
+5.1. The current connection for a map can be printed with <br>
-<pre>
-field table [key [database [driver]]]
-</pre>
+<div class="code"><pre>
+v.db.connect vectmap
+</div></pre>
+<P>
-If key, database or driver are omited (on second and higher row only) last
-definition is used.
-<p>
+The settings for the db.* modules (Driver and Database) can
+be defined/modified with 'db.connect'. To set it to the same settings as
+the v.* modules use per default, run:
-Wild cards * and ? may be used. Variables GISDBASE, $LOCATION, $FIELD may
-$be used in table, key, database and driver names.
-Usually the <tt>dbln</tt> file is either generated by a GRASS command or
-pretty straightforward to write.
+<div class="code"><pre>
+db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'
+</div></pre>
<p><table width="100%" cellpadding="3" border="0">
<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
@@ -124,7 +102,7 @@
</b></big></font></td></tr></table>
Example: Connection of SHAPE file with attributes in DBF file which was
-registered with 'v.shape.register' (see <a href=geom_storage.html#SHAPE>here</a>).
+registered with 'v.format' (see <a href=geom_storage.html#SHAPE>here</a>).
<p>
You can check the connection of a vector map to a table:
@@ -133,15 +111,17 @@
v.db.connect markveggy.shp
</div></pre>
-which should print the database connection to DBF file.
+which should print the database connection to the related DBF file.
<P>
-For the <tt>db.*</tt> commands, connect GRASS 5.1 to the table:
+If you want to use the <tt>db.*</tt> commands, you first have to connect
+GRASS 5.1 to the table's directory:
+
<div class="code"><pre>
-db.connect driver=dbf database=/ssi0/ssi/neteler/grassdata/botswanaLL/shp
+db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf'
db.tables -p
</div></pre>
-Now the table name 'markveggy' should be printed which is the DBF file.
+... which prints the available tables for that connection.
<p><table width="100%" cellpadding="3" border="0">
@@ -160,9 +140,9 @@
<tr>
<td valign="top" align="center" bgcolor="#99ff99">GRASS module <->
DBMI <-> ODBCdriver</td>
- <td valign="top" align="center" bgcolor="#99ff99"><-></td>
+ <td valign="top" align="center" bgcolor="#99ff99"><-> </td>
<td valign="top" align="center" bgcolor="#99ff99">unixODBC</td>
- <td valign="top" align="center" bgcolor="#99ff99"><--></td>
+ <td valign="top" align="center" bgcolor="#99ff99"><--> </td>
<td valign="top" align="center" bgcolor="#99ff99">ODBC-to-RDBMS-driver
<-> RDBMS Database</td>
</tr>
@@ -240,7 +220,7 @@
UserName = neteler
Password =
Port = 5432
- Protocol = 7.0.3
+ Protocol = 7.2
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
@@ -273,7 +253,8 @@
to_table=markveggy
</div></pre>
-<li> Next add an entry in the GRASS 5.1 'dbln' file:
+<li> Next add an entry in the GRASS 5.1 'dbln' file (put this into the
+ vector map subdirectory):
<div class="code"><pre>
# field table ID database DBMIdriver
1 markveggy VEGCNP_ID grass51test odbc
Index: demo.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/demo.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- demo.html 29 Jan 2003 14:48:51 -0000 1.5
+++ demo.html 10 Feb 2003 17:32:26 -0000 1.6
@@ -28,7 +28,7 @@
<i><b>README:</b>
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.
+contains only a few modules) nor it is intended for productional usage.
Development releases are provided for people who want to help test, debug,
and improve GRASS 5.1. Knowing this, please read on.</i><br>
<i>
Index: examples.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/examples.html,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- examples.html 10 Feb 2003 13:18:26 -0000 1.15
+++ examples.html 10 Feb 2003 17:32:26 -0000 1.16
@@ -27,7 +27,7 @@
<hr>
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.
+contains only a few modules) nor it is intended for 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>
@@ -116,13 +116,17 @@
To convert 5.0 vector data to 5.1, run:
<div class="code"><pre>
v.convert in=vectormap_from_50 out=vectormap
+v.db.connect vectormap
+g.region -p vect=vectormap
+d.vect vectormap
+d.m
</div></pre>
Vector maps from 5.0 and 5.1 do not interfere (different directories),
so you can use the same names.
<p><b>
-Convert 5.1 vector map to GRASS 5.0
+Convert 5.1 vector map back to GRASS 5.0
</b><p>
<div class="code"><pre>
@@ -141,7 +145,7 @@
There are various possibilities to store vector geometry in GRASS 5.1:
<ul>
-<li>native format (default)
+<li>native 5.1 format (default)
<li>SHAPE format
<li>PostGRASS format (using PostgreSQL/PostGIS)
<li>OGR supported formats (under development)
@@ -161,7 +165,7 @@
There are various possibilities to store attributes in GRASS 5.1:
<ul>
-<li>DBF file
+<li>DBF file (default)
<li>ODBC connected RDBMS
<li>PostgreSQL database
<li>mySQL database
Index: geom_storage.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/geom_storage.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- geom_storage.html 24 Jan 2003 15:08:32 -0000 1.8
+++ geom_storage.html 10 Feb 2003 17:32:26 -0000 1.9
@@ -28,7 +28,7 @@
<i><b>README:</b>
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.
+contains only a few modules) nor it is intended for productional usage.
Development releases are provided for people who want to help test, debug,
and improve GRASS 5.1. Knowing this, please read on.</i><br>
<i>
@@ -45,6 +45,7 @@
SHAPE format</a>
<li><a href="#PostGRASS">Geometry stored in external database (PostGRASS)
using PostGIS</a>
+<li><a href="#OGR">Geometry stored with OGR</a>
</ol>
To get debug information, set variable (set to 0 for debug silence) to 1..5:<div class="code"><pre>
@@ -89,7 +90,6 @@
See some vector API details <a href="http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass51/doc/vector/vector.html">here</a>.
-
<p><table width="100%" cellpadding="3" border="0">
<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
<a name="native"></a>
@@ -213,6 +213,15 @@
Further hints for GRASS/PostGRASS/PostGIS: see e.g. <a
href="http://grass.itc.it/pipermail/grassuser/2002-November/015822.html">this
thread</a>.
+
+<p><table width="100%" cellpadding="3" border="0">
+<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
+<a name="OGR"></a>
+Geometry stored with OGR
+<DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
+</b></big></font></td></tr></table>
+
+One day this will be implemented in GRASS 5.1.
<hr>
Index: index.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/index.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- index.html 29 Jan 2003 14:59:17 -0000 1.10
+++ index.html 10 Feb 2003 17:32:26 -0000 1.11
@@ -24,29 +24,49 @@
<p>
Welcome to this draft tutorial.
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.
+contains only a few modules) nor it is intended for productional usage.
Development releases are provided for people who want to help test, debug,
and improve GRASS 5.1. Knowing this, please read on.
+<h3>The default settings</h3>
+
+<b>Default settings for vector geometry:</b><P>
+
+Per default all GRASS 5.1 vectors are stored in native 5.1 format within the
+directory $GISDBASE/$LOCATION_NAME/$MAPSET/vector/$MAP/. All map related
+data such as geometry data, spatial index, DB-connection info etc. are
+stored in this directory (see <i>Geometry management</i> below for details).
+<P>
+
+<b>Default settings for vector attributes</b><P>
+
+Per default all GRASS 5.1 vector attributes are stored in a DBF table within
+the directory $GISDBASE/$LOCATION_NAME/$MAPSET/dbf. The default settings
+(DBMI driver and DATABASE) can be modified with 'db.connect' (see
+<i>Attribute management</i> below for details).
+
<h2>GRASS 5.1 Tutorial</h2>
<ol>
<li><a href="demo.html">A demo tour through GRASS 5.1</a>
-<li>Vector data management in GRASS 5.1
+<li>Vector data management in GRASS 5.1:
<ul>
<li><a href="geom_storage.html">Geometry management, optionally with connections to DBMS</a>
<li><a href="attrib_storage.html">Attribute management with connections to DBMS</a>
</ul>
<li><a href="examples.html">Examples how to use the GRASS 5.1 vector engine</a>
+<li><a href="techdocs.html">Some vector API docs</a> (not recommended to read)
<li><a href="links.html">Links</a>
</ol>
+
+
<h3>Tutorial Quick Guide</h3>
The table does not refer to all <a href="examples.html">examples</a>, please
also check the individual tables of contents. You can combine the different
-storage methods for geometry and attributes. Per default "Native" (local)
+storage methods for geometry and attributes. Per default "Native format"
geometry storage and DBF attribute storage is used.
<center>
@@ -63,7 +83,7 @@
<td><b>SHAPE</b></td>
<td><b>PostGIS</b></td>
<td><b>OGR</b></td>
- <td bgcolor="#F0F0F0"><b>DBF</b></td>
+ <td bgcolor="#D0F0D0"><b>DBF (default)</b></td>
<td bgcolor="#F0F0F0"><b>mySQL</b></td>
<td bgcolor="#F0F0F0"><b>PostgreSQL</b></td>
<td bgcolor="#F0F0F0"><b>ODBC</b></td>
@@ -84,7 +104,7 @@
<a href="geom_storage.html#PostGRASS">Def.</a> /
<a href="examples.html#postgismapserver">Ex.</a></td>
<td align="center"> <i>not yet implemented</i> </td>
- <td align="center" bgcolor="#F0F0F0"> -- </td>
+ <td align="center" bgcolor="#D0F0D0"> -- </td>
<td align="center" bgcolor="#F0F0F0"> -- </td>
<td bgcolor="#F0F0F0">with PostGIS,
<i>see there</i></td>
@@ -96,10 +116,10 @@
<i>see there</i></td>
<td>with DBF,
<i>see there</i></td>
- <td>with PostgreSQL ,
+ <td>with PostgreSQL,
<i>see there</i></td>
<td align="center"> <i>not yet implemented</i> </td>
- <td bgcolor="#F0F0F0">Int, Double, String, DateTime (?) ,
+ <td bgcolor="#D0F0D0">Int, Double, String, DateTime (?) ,
<a href="attrib_storage.html#DBF">Def.</a> /
<a href="examples.html#db_copy">Ex.</a></td>
<td bgcolor="#F0F0F0">Int, Double, String, DateTime (?) ,
Index: troubleshooting.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/troubleshooting.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- troubleshooting.html 8 Feb 2003 21:31:06 -0000 1.1
+++ troubleshooting.html 10 Feb 2003 17:32:26 -0000 1.2
@@ -28,7 +28,7 @@
<hr>
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.
+contains only a few modules) nor it is intended for 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>
More information about the grass-web
mailing list