[GRASSweb-list]markus: web/grass51/tutorial ex_basic.html,1.1,1.2 ex_complex.html,1.1,1.2 examples.html,1.17,1.18 index.html,1.13,1.14 links.html,1.2,1.3 troubleshooting.html,1.2,1.3
grass at intevation.de
grass at intevation.de
Mon Feb 17 10:49:09 EST 2003
Author: markus
Update of /grassrepository/web/grass51/tutorial
In directory doto:/tmp/cvs-serv13806
Modified Files:
ex_basic.html ex_complex.html examples.html index.html
links.html troubleshooting.html
Log Message:
updated
Index: ex_basic.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/ex_basic.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ex_basic.html 12 Feb 2003 12:13:26 -0000 1.1
+++ ex_basic.html 17 Feb 2003 15:49:07 -0000 1.2
@@ -13,7 +13,7 @@
<A HREF="index.html">
<DEFANGED_IMG src="../../images/grass.smlogo.gif" alt="HOME" border="0" align=middle></A>
</td><td><H1>
-GRASS 5.1 Usage Examples
+GRASS 5.1 Usage Examples - basics
</H1></td></tr></table>
<!-- END OF HEADER -->
@@ -37,11 +37,11 @@
code bugfixes/enhancements.</i>
<P>
-
<hr>
+<h3>Basic Examples</h3>
+
<a name="toc"></a>
<ol>
-<li><a href="#intro">Introduction to Examples</a>
<li><a href="#convert">Convert from/to GRASS 5.0 vector maps</a>
<li><a href="#geometry">Geometry storage in various formats</a>
<li><a href="#attributes">Attribute storage in (external) databases</a>
@@ -51,54 +51,14 @@
with SQL statements (PostGRASS)</a>
<li><a href="#ogr_export">Example: Vector map export data using OGR</a>
<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 set</a>
-<li><a href="#db_copy">Example: Copying a database table from one DBMS to another within GRASS 5.1
- table</a>
+<li><a href="#db_copy">Example: Copying a database table from one DBMS to another
+ within GRASS 5.1</a>
</ol>
<p><table width="100%" cellpadding="3" border="0">
<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
-<a name="intro"></a>
-Introduction to Examples
-<DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
-</b></big></font></td></tr></table>
-
-Before starting with
-
-<h2>Following modules are available at time of this writing</h2> (see
-timestamp at bottom, this list may not reflect the latest changes)
-
-<ul>
-<li>d.erase d.m d.mon d.path d.rast d.vect d.what.rast d.what.vect d.zoom
-<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
- postgisdb
-<li>g.copy g.gisenv g.list g.mapsets g.region g.remove g.rename
-<li>nviz
-<li>v.build v.build.polylines v.category v.clean v.convert v.db.connect
- v.digit v.extract v.format v.in.ascii v.in.ogr v.in.sites v.info
- v.out.ascii
- v.out.ogr v.patch v.shape.register v.shape.unregister v.surf.rst
- v.topo.check
-<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>.
-<li>
-d.m is a new <a href=http://mpa.itc.it/radim/g51/d.m.jpg>display manager</a>.
-</ul>
-
-To get debug information, set variable (set to 0 for debug silence) to
- 1..5:
-<div class="code"><pre>
-export GRASS_DEBUG_LEVEL=5
-</div></pre>
-
-
-<p><table width="100%" cellpadding="3" border="0">
-<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
<a name="convert"></a>
Convert from/to GRASS 5.0 vector maps
<DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
@@ -351,57 +311,6 @@
Hints for GRASS-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="shape_conversion"></a>
-Example: Conversion of SHAPE map to GRASS 5.1 vector map
-<DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
-</b></big></font></td></tr></table>
-
-WARNING: don't try this at home. Still pretty unstable.
-
-<div class="code"><pre>
-v.out.ascii markveggy.shp out=test1
-v.in.ascii test1 out=newmap
-v.info newmap
-
-#NOTE: this cannot work properly as SHAPE contains closed polygons
-#v.clean should be used etc...
-
-v.clean newmap out=newmap.clean tool=break,rmdupl
-d.vect newmap.clean ty=area,boundary col=red
-
-#we connect this map to the old DBF file:
-db.connect database=/ssi0/ssi/neteler/grassdata/botswanaLL/shp
-db.describe table=markveggy
-
-#we have to add an entry to the DB file:
-cd `g.gisenv GISDBASE`
-cd `g.gisenv LOCATION_NAME`
-cd `g.gisenv MAPSET`
-
-#if DB file not present, create it. Otherwise add the line:
-newmap 1 markveggy VEGCNP_ID /ssi0/ssi/neteler/grassdata/botswanaLL/PERMANENT/shp dbf
-
-#NOTE: it is sufficent to only write changed entries for 'KEY_COLUMN',
-# 'path' and 'driver' entries because unchanged entries are inherited
-# from the previous line(s). The full DB file make now contain:
-markveggy.shp 1 markveggy VEGCNP_ID /ssi0/ssi/neteler/grassdata/botswanaLL/PERMANENT/shp dbf
-newmap 1 markveggy
-
-#... which links map 'newmap' with field 1 to table 'markveggy' with CAT_COLUMN
-#'VEGCNP_ID' with the DBF file in directory '/ssi0/ssi...' using the 'dbf' driver
-#(yes, we need an DB file editor - do you write it for us?)
-
-#verify some settings:
-g.gisenv
-
-#query
-d.erase
-d.vect newmap
-d.what.vect newmap
-</div></pre>
<p><table width="100%" cellpadding="3" border="0">
<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
Index: ex_complex.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/ex_complex.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ex_complex.html 12 Feb 2003 12:13:26 -0000 1.1
+++ ex_complex.html 17 Feb 2003 15:49:07 -0000 1.2
@@ -37,21 +37,25 @@
code bugfixes/enhancements.</i>
<P>
-
<hr>
+<h3>More complex examples</h3>
+
<a name="toc"></a>
<ol>
<li><a href="#postgismapserver">Example: Writing the GRASS 5.0 Spearfish
- 'streams' map into PostGIS for MapServer</a>
+ 'streams' map into PostGIS with MapServer access</a>
<li><a href="#shortestpath">Example: shortest path vector networking with
d.path</a>
+<li><a href="#shape_conversion">Example: Conversion of SHAPE map to GRASS
+ 5.1 vector map</a>
</ol>
<p><table width="100%" cellpadding="3" border="0">
<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
<a name="postgismapserver"></a>
-Example: Writing the GRASS 5.0 Spearfish 'streams' map into PostGIS for MapServer
+Example: Writing the GRASS 5.0 Spearfish 'streams' map into PostGIS with
+MapServer access
<DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
</b></big></font></td></tr></table>
@@ -305,6 +309,48 @@
To see the forward directions of the vector lines, use the 'dir' for the
'display' parameter in 'd.vect'. It will add small arrows indicating the
forward directions when plotting the vector map.
+
+<p><table width="100%" cellpadding="3" border="0">
+<tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
+<a name="shape_conversion"></a>
+Example: Conversion of SHAPE map to GRASS 5.1 vector map
+<DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
+</b></big></font></td></tr></table>
+
+This time we are not talking about simlpy registering a SHAPE map,
+but really converting it to another format.<br>
+WARNING: don't try this at home. Still pretty unstable.
+
+<div class="code"><pre>
+v.out.ascii markveggy.shp out=test1
+v.in.ascii test1 out=newmap
+v.info newmap
+
+#NOTE: this cannot work properly as SHAPE contains closed polygons
+#v.clean should be used etc...
+
+v.clean newmap out=newmap.clean tool=break,rmdupl
+d.vect newmap.clean ty=area,boundary col=red
+
+#we connect this map to the old DBF file in the 'dbln' file:
+cd `g.gisenv GISDBASE`
+cd `g.gisenv LOCATION_NAME`
+cd `g.gisenv MAPSET`
+
+#create here a file 'dbln' with following contents:
+1 markveggy VEGCNP_ID /ssi0/ssi/neteler/grassdata/botswanaLL/PERMANENT/shp dbf
+
+#check if it is connected:
+v.db.connect newmap
+
+#draw & query
+d.erase
+d.vect newmap
+d.what.vect newmap
+</div></pre>
+
+TODO: check if meanwhile g.copy does the same, probably followed by v.clean
+with rmdupl.
<!-- FOOTER -->
Index: examples.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/examples.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- examples.html 12 Feb 2003 12:13:26 -0000 1.17
+++ examples.html 17 Feb 2003 15:49:07 -0000 1.18
@@ -37,6 +37,35 @@
code bugfixes/enhancements.</i>
<P>
+<h2>Following modules are available at time of this writing</h2> (see
+timestamp at bottom, this list may not reflect the latest changes)
+
+<ul>
+<li>d.erase d.m d.mon d.path d.rast d.vect d.what.rast d.what.vect d.zoom
+<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
+ postgisdb
+<li>g.copy g.gisenv g.list g.mapsets g.region g.remove g.rename
+<li>nviz
+<li>r.buffer r.clump r.colors r.composite r.cost r.his r.mapcalc
+ (the same as in 5.0.x)
+<li>v.build v.build.polylines v.category v.clean v.convert v.database
+v.db.connect v.digit v.extract v.format v.in.ascii v.info v.in.ogr v.in.sites
+v.out.ascii v.out.ogr v.patch v.surf.rst v.topo.check v.to.rast v.transform
+
+<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>.
+<li>
+d.m is a new <a href=http://mpa.itc.it/radim/g51/d.m.jpg>display manager</a>.
+</ul>
+
+To get debug information, set variable (set to 0 for debug silence) to
+ 1..5:
+<div class="code"><pre>
+export GRASS_DEBUG_LEVEL=5
+</div></pre>
+
<hr>
<a name="toc"></a>
Index: index.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/index.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- index.html 12 Feb 2003 12:13:26 -0000 1.13
+++ index.html 17 Feb 2003 15:49:07 -0000 1.14
@@ -28,151 +28,25 @@
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 (dbln file) info
-etc. are stored in this directory. Maps can be read from SHAPE files
-directly, read and written to PostGRASS (using PostGIS) and in future
-through OGR. 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 'v.database'.
-See <i>Attribute management</i> below for details.
-
-
<h2>GRASS 5.1 Tutorial</h2>
<a name="toc"></a>
<ol>
+<li><a href="intro.html">Introduction</a>
<li><a href="demo.html">A demo tour through GRASS 5.1</a>
<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>Usage examples:
+<li><a href="examples.html">Usage examples</a>:
<ul>
- <li><a href="ex_basic.html">Basic examples</a>
- <li><a href="ex_complex.html">Complex examples</a>
+ <li><a href="ex_basic.html">Basic</a> examples
+ <li><a href="ex_complex.html">Complex</a> examples
</ul>
+<li><a href="troubleshooting.html">Troubleshooting</a>
<li><a href="links.html">Links</a>
<li> Appendix: <a href="techdocs.html">Some vector API docs</a> (not recommended to read)
</ol>
-
-
-
-<h3>Tutorial Quick Guide</h3>
-
-The table does not refer to all <a href="#toc">examples</a>, please
-also check the individual tables of contents. You can combine the different
-storage methods for geometry and attributes. Per default "Native format"
-geometry storage and DBF attribute storage is used.
-
-<center>
-<table border=2>
-<tr>
-<td bgcolor="#FFF0B0"></td>
-<td colspan="8" bgcolor="#FFF0B0">
-<i>Formats/RDBMS</i>
-</td>
-</tr>
-<tr>
- <td bgcolor="#FFF0B0"> </td>
- <td bgcolor="#D0F0D0"><b>Native (default)</b></td>
- <td><b>SHAPE</b></td>
- <td><b>PostGIS</b></td>
- <td><b>OGR</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>
-</tr>
-<tr>
- <td bgcolor="#FFF0B0"><b>Geometry</b> </td>
- <td bgcolor="#D0F0D0">
- 2D/3D vectors,
- topology,
- <a href="geom_storage.html#native">Def.</a> /
- <a href="examples.html#convert">Ex.</a></td>
- <td>2D/3D vectors,
- pseudotopology,
- <a href="geom_storage.html#SHAPE">Def.</a> /
- <a href="examples.html#shape_conversion">Ex.1</a> / <a href="examples.html#ogr_export">Ex.2</a> </td>
- <td>needs PostgreSQL ,
- pseudotopology [1],
- <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="#D0F0D0"> -- </td>
- <td align="center" bgcolor="#F0F0F0"> -- </td>
- <td bgcolor="#F0F0F0">with PostGIS,
- <i>see there</i></td>
- <td align="center" bgcolor="#F0F0F0"> -- </td>
-</tr>
-<tr>
- <td bgcolor="#FFF0B0"><b>Attributes</b> </td>
- <td bgcolor="#D0F0D0">reads/writes DBF tables,
- <i>see there</i></td>
- <td>with DBF,
- <i>see there</i></td>
- <td>with PostgreSQL,
- <i>see there</i></td>
- <td align="center"> <i>not yet implemented</i> </td>
- <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 (?) ,
- <a href="attrib_storage.html#mySQL">Def.</a></td>
- <td bgcolor="#F0F0F0">Int, Double, String, DateTime (?) ,
- <a href="attrib_storage.html#PostgreSQL">Def.</a> /
- <a href="examples.html#db_copy">Ex.</a></td>
- <td bgcolor="#F0F0F0">links to various <a href="http://www.unixodbc.org">RDBMS</a> ,
- <a href="attrib_storage.html#ODBC">Def.</a> </td>
-</tr>
-<tr>
-<td bgcolor="#FFF0B0">Legend:</td>
-<td colspan="8">
-<i>Def.: Definition, Ex.: Example, --: not applicable</i></td>
-</tr>
-<tr>
-<td bgcolor="#FFF0B0">Remarks:</td>
-<td colspan="8">
-
-[1] PostGRASS/PostGIS support: Geometry primitives (points, lines, boundaries,
-centroids) are stored in PostGIS and topology is build in GRASS. This is
-implemented for reading and writing but not (yet) for update.
-PostGRASS data are not OGC Simple Features compliant as GRASS uses topology.
-That means that e.g. MapServer cannot see PostGRASS/PostGIS polygons, but
-only lines/boundaries and points.
-</td>
-</tr>
-
-</table>
-</center>
-
-<h3>Bibliography:</h3>
-
-R. Blazek, M. Neteler, and R. Micarelli, 2002. The new GRASS 5.1 vector
-architecture. In <i>Open Source GIS - GRASS users conference 2002, Trento,
-Italy, 11-13 September 2002. University of Trento, Italy</i>.
-<a target="top" href="http://www.ing.unitn.it/~grass/conferences/GRASS2002/proceedings/proceedings/pdfs/Blazek_Radim.pdf">http://www.ing.unitn.it/~grass/conferences/GRASS2002/proceedings/proceedings/pdfs/Blazek_Radim.pdf</a>
-<p>
-
-<h3>Related:</h3>
-
-<ul>
-<li><a href=../index.html>GRASS 5.1 main page</a></li>
-<li><a href=../manuals/>GRASS 5.1 Draft Programmer's Manual</a></li>
-<li> Implementation of new <a
- href="http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass51/doc/vector/vector.html">GRASS
- 5.1 vector API</a> (3D vectors, DBMS support, 32/64bit support)</li>
-</ul>
<!-- FOOTER -->
<p>
Index: links.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/links.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- links.html 28 Jan 2003 14:58:21 -0000 1.2
+++ links.html 17 Feb 2003 15:49:07 -0000 1.3
@@ -26,7 +26,7 @@
<a href="links.html">Links</a>
<hr>
-<b>Further Links:</b>
+<h3>Further Links to software/documents:</h3>
<ul>
<li>Vector attributes:
@@ -64,10 +64,31 @@
PostgreSQL driver docs</a>
</ul>
</ul>
+
+
+
+<h3>Related:</h3>
+
+<ul>
+<li><a href=../index.html>GRASS 5.1 main page</a></li>
+<li><a href=../manuals/>GRASS 5.1 Draft Programmer's Manual</a></li>
+<li> Implementation of new <a
+ href="http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass51/doc/vector/vector.html">GRASS
+ 5.1 vector API</a> (3D vectors, DBMS support, 32/64bit support)</li>
+</ul>
+
+<h3>Bibliography:</h3>
+
+R. Blazek, M. Neteler, and R. Micarelli, 2002. The new GRASS 5.1 vector
+architecture. In <i>Open Source GIS - GRASS users conference 2002, Trento,
+Italy, 11-13 September 2002. University of Trento, Italy</i>.
+<a target="top" href="http://www.ing.unitn.it/~grass/conferences/GRASS2002/proceedings/proceedings/pdfs/Blazek_Radim.pdf">http://www.ing.unitn.it/~grass/conferences/GRASS2002/proceedings/proceedings/pdfs/Blazek_Radim.pdf</a>
+
+
<!-- FOOTER -->
<p>
<hr>
-<DIV ALIGN=right>© 2002 Markus Neteler<br>
+<DIV ALIGN=right>© 2002-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$
Index: troubleshooting.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/troubleshooting.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- troubleshooting.html 10 Feb 2003 17:32:26 -0000 1.2
+++ troubleshooting.html 17 Feb 2003 15:49:07 -0000 1.3
@@ -40,24 +40,28 @@
<hr>
<a name="toc"></a>
+Questions:
<ol>
-<li><a href="#sqlnames">My SQL query is rejected (parse error)!</a>
+<li><a href="#sqlnames">The SQL query is rejected (parse error)!</a>
</ol>
+<hr>
+Answers:<P>
+
<a name="sqlnames"></a>
-<b>Q: My SQL query is rejected (parse error)!</b><br>
+<b>Q: The SQL query is rejected (parse error)!</b><br>
-A: Check the table name. SQL does not support '.' (dots) in table names.<br>
-Supported table name characters are:
+A: Check the table name. E.g. SQL does not support '.' (dots) in table names.<br>
+Supported table name characters are only:
<pre>
[A-Za-z][A-Za-z0-9_]*
</pre>
-
+(so a table name must start with a character, not a number).
<!-- FOOTER -->
<p>
<hr>
-<DIV ALIGN=right>© 2002-2003 Markus Neteler<br>
+<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$
More information about the grass-web
mailing list