[GRASSweb-list]markus: web/grass57/tutorial attrib_storage.html,1.22,1.23 ex_complex.html,1.12,1.13 geom_storage.html,1.26,1.27 intro.html,1.7,1.8 network.html,1.13,1.14

grass at intevation.de grass at intevation.de
Mon Sep 6 11:31:10 EDT 2004


Author: markus

Update of /grassrepository/web/grass57/tutorial
In directory doto:/tmp/cvs-serv10821

Modified Files:
	attrib_storage.html ex_complex.html geom_storage.html 
	intro.html network.html 
Log Message:
eliminated v.format, added v.external

Index: attrib_storage.html
===================================================================
RCS file: /grassrepository/web/grass57/tutorial/attrib_storage.html,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- attrib_storage.html	19 May 2004 15:19:14 -0000	1.22
+++ attrib_storage.html	6 Sep 2004 15:31:07 -0000	1.23
@@ -110,7 +110,7 @@
 </b></big></font></td></tr></table>
 
 Example: SHAPE file with attributes in DBF file which was
-registered with 'v.format' (see <a href=geom_storage.html#SHAPE>here</a>).
+registered with 'v.external' (see <a href=geom_storage.html#SHAPE>here</a>).
 
 <p>
 You can verify the connection of a vector map to a table:

Index: ex_complex.html
===================================================================
RCS file: /grassrepository/web/grass57/tutorial/ex_complex.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ex_complex.html	1 Mar 2004 08:29:19 -0000	1.12
+++ ex_complex.html	6 Sep 2004 15:31:07 -0000	1.13
@@ -33,69 +33,61 @@
 <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 with
+Example: Writing the GRASS 5.0 Spearfish 'soils' map into PostGIS with
 MapServer access
 <DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
 </b></big></font></td></tr></table>
 
-In this example we want to take the Spearfish 'streams' vector map and write
-it to PostGRASS (PostGIS). This map will be accessible by MapServer.<br>
-<b>Note:</b> PostGRASS data linked to MapServer support only LINE and POINT
-vectors but not POLYGONS (PostGRASS is not doubling boundaries as required
-for non-topological OGR/MapServer - this may change in future).
+In this example we want to take the Spearfish 'soils' vector map and write
+it to PostGIS. This map will be also accessible by MapServer then.<br>
 <P>
-First we create a new PostGIS database suitable for PostGRASS:
+First we create a new PostGIS database:
 
 <div class="code"><pre>
 #you need the file postgis.sql from PostGIS in the current directory:
 pg.postgisdb -c spearfish -h pgserver.itc.it -U postgres -G ./
-</pre></div>
-
-<br>
-Now we change the GRASS 5.7 default setting for geometry data storage
-from the internal native format to PostGRASS:
-
-<div class="code"><pre>
-v.format
-  # Select "Output format (Native or PostGIS)" from the menu
-  # Select  Output format: postgis
-  # Select  PostGIS database: host=pgserver.itc.it,dbname=spearfish,user=postgres
-  # click "Apply" (check for error messages in the terminal window), 
-  #       "Close"
-</pre></div>
-
-<br>
-Next we change the GRASS 5.7 default setting for attribute data storage
-from the internal DBF format to PostgreSQL:
 
-<div class="code"><pre>
-v.database driver=pg database="host=pgserver.itc.it,dbname=spearfish,user=postgres"
+#You may also create it directly in PostgreSQL.
 </pre></div>
 
 <br>
 We are ready to import the data now. As we are using the GRASS 5.0 spearfish
-data base, we have to convert the data to the new format. The new map will
-be directly stored in our PostGRASS server:
+data base, we have to convert the data to the new format (alternativly you can
+grab the Spearfish5.7 data set and skip v.convert):
 
 <div class="code"><pre>
-v.convert input=streams output=streams
+v.convert input=soils output=soils
 </pre></div>
 
 <br>
-Note that there are two small (!) leftover vector lines in the original 5.0
-streams map. These you may delete with the new 'v.digit', then the topology
-will be clean.
+Note that the map is topologically correct in the new Spearfish5.7 data set.
 <P>
 The vector geometry and the attributes table are linked automatically.
 To verify that, we run:
 
 <div class="code"><pre>
-v.info streams
+v.info soils
  [...]
- Map format: postgis
+ Map format: native
  [...]
  Number of dblinks:      1
  [...]
+ 
+#see history:
+v.info -h soils
+</pre></div>
+
+<br>
+Now we'll write out the map to PostGIS:
+<div class="code"><pre>
+#Export area from GRASS vector map directly to PostGIS:
+v.out.ogr input=soils type=area dsn="PG:host=localhost dbname=postgis user=postgres" layer=soils format=PostgreSQL
+</pre></div>
+
+<br>
+Next we'll link it virtually back to GRASS:
+<div class="code"><pre>
+v.external dsn="PG:host=localhost user=postgres dbname=postgis" layer=soils output=soilsPG
 </pre></div>
 
 <br>
@@ -103,10 +95,10 @@
 
 <div class="code"><pre>
 d.mon x0
-g.region vect=streams
-d.vect streams col=blue
-v.db.connect -p streams
-d.what.vect streams
+g.region vect=soilsPG
+d.vect soilsPG col=blue
+v.db.connect -p soilsPG
+d.what.vect soilsPG
 </pre></div>
 
 <br>
@@ -114,7 +106,7 @@
 <div class="code"><pre>
 db.connect driver=pg database="host=pgserver.itc.it,dbname=spearfish,user=postgres"
 db.tables -p
-db.describe -c streams
+db.describe -c soils
 </pre></div>
 
 <P>

Index: geom_storage.html
===================================================================
RCS file: /grassrepository/web/grass57/tutorial/geom_storage.html,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- geom_storage.html	21 Jul 2004 21:15:50 -0000	1.26
+++ geom_storage.html	6 Sep 2004 15:31:07 -0000	1.27
@@ -64,22 +64,15 @@
 </b></big></font></td></tr></table>
 
 Per default vector map geometry is stored locally in native 5.7 format.
-This default definition can be modified with:
+External vector maps can be virtually linked into GRASS with:
 
 <div class="code"><pre>
-v.format
+v.external
 </pre></div>
 <P>
 
-Possible settings are for "Output Format":
-<ul>
-<li>native: (nothing else to be selected/filled)
-<li>PostGIS: <br>
-         database='host=pgserver.itc.it,dbname=grass57test,user=name'
-<li>SHAPE: This can be used to register a SHAPE into a MAPSET<br>
-   Select SHAPE file with 'Browse'
-</ul>
-
+Supported formats depend on the OGR installation, usually SHAPE,
+MapInfo, DGN, Arc/Coverages etc are supported.
 
 <p><table width="100%" cellpadding="3" border="0">
 <tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
@@ -139,52 +132,47 @@
 <DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
 </b></big></font></td></tr></table>
 
-Direct SHAPE file support is implemented, i.e. maps in SHAPE format can be
-used directly in GRASS 5.7 without importing them. But you have to register
-the SHAPE file, it may be useful to copy them into the LOCATION:
+Maps in OGR supported formats such as the SHAPE format can be
+virtually linked into GRASS 5.7 without importing the files:
 
 <div class="code"><pre>
-v.shape.register markveggy.shp
-
-#or you can use (nice GUI):
-v.format
+ v.external dsn=/home/user/shape_data layer=markveggy.shp output=markveggy
 
 #get info about vector map:
- v.info markveggy.shp
+ v.info markveggy
 
 #look at the map:
  d.mon x0
- d.vect markveggy.shp
+ d.vect markveggy
 </pre></div>
 
-For SHAPE format, DBF table do not have to be registered in the DB file.
+<br>
 Read also <a href="attrib_storage.html#DBF">Attributes stored in DBF table</a>.
 
 <div class="code"><pre> 
 #query map:
  d.what.vect
- d.what.vect -a
 </pre></div>
 
+<!--
+
+needs to the update MN 9 2004
 
 <p><table width="100%" cellpadding="3" border="0">
 <tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>
 <a name="PostGRASS"></a>
-Geometry stored in PostGRASS database table using PostGIS
+Geometry stored in PostgreSQL database table using PostGIS
 <DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
 </b></big></font></td></tr></table>
 
-Current PostGRASS limitations: It is not possible use PostGIS data imported
-by ogr2ogr in GRASS (OGR support is planned but not yet present).
 Data must be first imported into GRASS, then written to PostGIS.
 <br>
-<i>Future: Using PostGRASS which stores the vector geometry in a
-PostgreSQL/PostGIS database, multiple user write access to vector geometry
-will become possible. Then also updating of vector geometry stored in
-PostGRASS with v.digit will be possible.</i>
+<i>Future: Multiple user write access to vector geometry
+might become possible. Then also updating of vector geometry stored in
+PostGIS with v.digit might become possible.</i>
 <P>
 
-In this example we want to put the vector map 'census1990wet.shp' (a SHAPE
+In this example we want to put the vector map 'census1990wet' (a SHAPE
 file registed into GRASS) into database 'botswanaUTM34' on server 'pgserver'
 as user 'postgres'. First we create a PostGIS database (the example needs
 the file postgis.sql in the current directory):
@@ -238,6 +226,10 @@
 href="http://grass.itc.it/pipermail/grassuser/2002-November/007820.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>
@@ -245,8 +237,8 @@
 <DIV ALIGN=right><a href="#toc">[UP]</a></DIV>
 </b></big></font></td></tr></table>
 
-One day this will be implemented in GRASS 5.7. Then full MapServer/PostGIS
-support will be available.
+Now implemented in GRASS 5.7, giving you full MapServer/PostGIS
+support. See v.in.ogr and v.out.ogr.
 
 <p><table width="100%" cellpadding="3" border="0">
 <tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>

Index: intro.html
===================================================================
RCS file: /grassrepository/web/grass57/tutorial/intro.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- intro.html	1 Mar 2004 08:29:19 -0000	1.7
+++ intro.html	6 Sep 2004 15:31:07 -0000	1.8
@@ -37,9 +37,9 @@
 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. Geometry can be also read from SHAPE
-files directly, read and written to PostGRASS (using PostGIS) and in future
-through OGR. <b>The default settings for geometry storage can be modified with
-'v.format'.</b>  See <i>Geometry management</i> below for details. <p>
+or other files directly (see v.external), read from PostGIS and in future
+maybe also write support for virtual vector maps will be implemented.
+See <i>Geometry management</i> below for details. <p>
 
 <b>Default settings for vector attributes</b><p>
 
@@ -65,6 +65,8 @@
  href=http://mpa.itc.it/radim/g51/d.vect-gui.jpg>GUI window pops up</a>.
 <li>
 d.m is the new <a href=http://mpa.itc.it/radim/g51/d.m.jpg>display manager</a>.
+<li>
+<a href=http://qgis.sourceforge.net>QGIS</a> is the promising new GUI for GRASS!
 </ul>
 
 
@@ -87,9 +89,7 @@
 <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><b>OGR supported formats (SHAPE, MapInfo, PostGIs etc)</b></td>
  <td bgcolor="#D0F0D0"><b>DBF  (default)</b></td>
  <td bgcolor="#F0F0F0"><b>mySQL</b></td>
  <td bgcolor="#F0F0F0"><b>PostgreSQL</b></td>
@@ -109,7 +109,7 @@
      <a href="ex_basic.html#ogr_export">Ex.2</a>  </td>
  <td>needs PostgreSQL ,
      pseudotopology [1],
-     <a href="geom_storage.html#PostGRASS">Def.</a> / 
+     <a href="geom_storage.html#PostGIS">Def.</a> / 
      <a href="ex_complex.html#postgismapserver">Ex.</a></td>
  <td align="center"> <i>not yet implemented</i> </td>
  <td align="center"  bgcolor="#D0F0D0"> -- </td>
@@ -147,12 +147,11 @@
 <td bgcolor="#FFF0B0">Remarks:</td>
 <td colspan="8">
 
-[1] PostGRASS/PostGIS support: Geometry primitives (points, lines, boundaries,
+[1] 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.
+implemented for reading, but not yet for writing.
+PostGIS data are OGC Simple Features compliant while GRASS uses topology.
+These models are converted accordingly by OGR.
 </td>
 </tr>
 
@@ -163,8 +162,8 @@
 <!-- FOOTER -->
 <p>
 <hr>
-<DIV ALIGN=right>&copy; 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.7 Tutorial Home</a><br>
+<DIV ALIGN=right>&copy; 2003-2004 Markus Neteler<br>
+<a href="mailto:neteler 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.7 Tutorial Home</a><br>
 <i>Last change:
 $Date$
 </i></DIV>

Index: network.html
===================================================================
RCS file: /grassrepository/web/grass57/tutorial/network.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- network.html	1 Mar 2004 08:29:19 -0000	1.13
+++ network.html	6 Sep 2004 15:31:07 -0000	1.14
@@ -124,10 +124,9 @@
 
 <h2>1. Import of SHAPE maps</h2>
 
-The SHAPE registration with 'v.format' is one option, but only intended for 
+The SHAPE registration with 'v.external' is one option, but only intended for 
 visualization. Since we want to work with the data, we import them into GRASS 
-with 'v.in.ogr'.<br>
-[expert note: a virtual column 'cat' is added when in=map is SHAPE]
+with 'v.in.ogr'.
 <P>
 
 #line/point layers:





More information about the grass-web mailing list