[GRASSweb-list]markus: web/grass51/tutorial geom_storage.html,1.17,1.18

grass at intevation.de grass at intevation.de
Thu Jul 31 12:04:28 EDT 2003


Author: markus

Update of /grassrepository/web/grass51/tutorial
In directory doto:/tmp/cvs-serv7623

Modified Files:
	geom_storage.html 
Log Message:
updated PostGRASS section (simplified)

Index: geom_storage.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/geom_storage.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- geom_storage.html	31 Jul 2003 09:19:49 -0000	1.17
+++ geom_storage.html	31 Jul 2003 16:04:26 -0000	1.18
@@ -197,48 +197,45 @@
 pg.postgisdb -c botswanaUTM34 -h pgserver.itc.it -U postgres -G ./
 </pre></div>
 
-Next we have to create a 'frmt' file which defines the PostGRASS connection
-and a 'head' file which defines the basic vector metadata:
-<div class="code"><pre>
-cd $HOME/grassdata/botswanaUTM34/PERMANENT/vector
-mkdir pgmap
-cd pgmap
-</pre></div>
+<br>
+Now we change the GRASS 5.1 default setting for geometry data storage
+from the internal native format to PostGRASS:
 
-Here generate the ASCII file 'frmt':
 <div class="code"><pre>
-FORMAT:postgis
-HOST:pgserver.itc.it
-DATABASE:botswanaUTM34
-USER:postgres
-GEOM_TABLE:pgmapg
-CAT_TABLE:pgmapc
+v.format
+  # Select "Output format (Native or PostGIS)" from the menu
+  # Select  Output format: postgis
+  # Select  PostGIS database: host=pgserver.itc.it,dbname=botswanaUTM34,user=postgres
+  # click "Apply" (check for error messages in the terminal window), 
+  #       "Close"
 </pre></div>
 
-Next we need a 'head' file (you may re-use another 'head' file from another
-vector map):
+<br>
+Next we change the GRASS 5.1 default setting for attribute data storage
+from the internal DBF format to PostgreSQL:
+
 <div class="code"><pre>
-ORGANIZATION: GRASS Development Team
-DIGIT DATE:   /9/Jan
-DIGIT NAME:   neteler
-MAP NAME:     pgmap
-MAP DATE:     2002
-MAP SCALE:    50000
-OTHER INFO:   -
-ZONE:         0
-MAP THRESH:   0.500000
+v.database driver=pg database="host=pgserver.itc.it,dbname=botswanaUTM34,user=postgres"
 </pre></div>
 
-Finally we import the map to PostGRASS:
+<br>
+We are ready to import the data now which will be stored directly in our PostGRASS server:
 
 <div class="code"><pre>
-v.out.ascii input=census1990wet.shp out=pgmap
-v.in.ascii input=pgmap out=pgmap
+v.convert input=census1990wet.shp output=census1990wet
+v.info census1990wet
+ [...]
+ Map format: postgis
+ [...]
+ Number of dblinks:      1
+ [...]
+d.vect census1990wet
+v.db.connect -p census1990wet
+d.what.vect census1990wet
 </pre></div>
 
-For the attributes storage in PostgreSQL, please <a
-href="attrib_storage.html#PostgreSQL">read on here</a> ('db.copy' will
-help).
+Note that also the attributes are stored in PostgreSQL now (read also <a
+href="attrib_storage.html#PostgreSQL">related text</a>).
 
 <P>
 Further hints for GRASS/PostGRASS/PostGIS: see e.g. <a
@@ -253,7 +250,7 @@
 </b></big></font></td></tr></table>
 
 One day this will be implemented in GRASS 5.1. Then full MapServer/PostGIS
-support is possible.
+support will be available.
 
 <p><table width="100%" cellpadding="3" border="0">
 <tr><td align="left" bgcolor="#B0F0B0"><font color="#00000"><big><b>





More information about the grass-web mailing list