[GRASSweb-list]markus: web/grass51/tutorial demo.html,1.1,1.2

grass at intevation.de grass at intevation.de
Wed Jan 22 13:27:22 EST 2003


Author: markus

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

Modified Files:
	demo.html 
Log Message:
benchmark native versus PostGIS added

Index: demo.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/demo.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- demo.html	31 Dec 2002 15:03:57 -0000	1.1
+++ demo.html	22 Jan 2003 18:27:19 -0000	1.2
@@ -135,9 +135,63 @@
 
 
 <li><tt>./bench</tt><br>
-- comparison between two formats: native x PostGRASS (using PostGIS)
+- comparison between two formats: native x PostGRASS (using PostGIS).
+The script is taking an existing vector map, copies it to PostGRASS and
+runs some benchmarks.
 <br>
-Example: todo.
+We must have the postgis.sql file in the current directory (or somewhere
+else, then modify the -G argument). First we generate a big vector map
+(first in ASCII, then we import into native GRASS format, the script is not
+very fast), then we generate a PostGIS table suitable for PostGRASS (you to
+specify the path to the postgis.sql file with -G):
+<br>
+
+<div class="code"><pre>
+./gen.big output=big n=100 shape=s
+v.in.ascii in=big out=big
+v.info big
+d.vect big
+postgisdb -c pgis -h pgserver.itc.it -U postgres -G ./
+</div></pre>
+
+Next we have to define the PostGRASS connection:
+<div class="code"><pre>
+cd `g.gisenv GISDBASE`
+cd `g.gisenv LOCATION_NAME`
+cd `g.gisenv MAPSET`
+mkdir -p vector/big.post
+cd vector/big.post
+</div></pre>
+
+There generate an ASCII file 'frmt' containing (update HOST and USER
+appropriate):
+<div class="code"><pre>
+FORMAT: postgis
+HOST:pgserver.itc.it
+USER:postgres
+DATABASE: pgis
+GEOM_TABLE: bigg
+CAT_TABLE: bigc
+</div></pre>
+
+And add an ASCII file 'head' containing:
+<div class="code"><pre>
+ORGANIZATION: GRASS Development Team
+DIGIT DATE:   1/6/2002
+DIGIT NAME:   radim
+MAP NAME:     big.post
+MAP DATE:     2002
+MAP SCALE:    10000
+OTHER INFO:   Big map
+ZONE:         0
+MAP THRESH:   0.500000
+</div></pre>
+
+Finally we run the benchmark script:
+<div class="code"><pre>
+./bench
+</div></pre>
+
 </li>
 </ul>
 





More information about the grass-web mailing list