[GRASSweb-list]markus: web/grass51/tutorial attrib_storage.html,1.7,1.8 examples.html,1.6,1.7 geom_storage.html,1.5,1.6

grass at intevation.de grass at intevation.de
Fri Jan 24 05:37:01 EST 2003


Author: markus

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

Modified Files:
	attrib_storage.html examples.html geom_storage.html 
Log Message:
added PostGIS views

Index: attrib_storage.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/attrib_storage.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- attrib_storage.html	23 Jan 2003 15:42:49 -0000	1.7
+++ attrib_storage.html	24 Jan 2003 10:36:58 -0000	1.8
@@ -456,6 +456,8 @@
     <a href=http://techdocs.postgresql.org/>PostgreSQL Technical
      Documentation</a>
 <li><a href=http://www.ca.postgresql.org/users-lounge/docs/>PostgreSQL Documentation</a>
+<li><a href=http://gdal.velocet.ca/projects/opengis/ogrhtml/drv_pg.html>ogr2ogr -
+    PostgreSQL</a>
 <li><a href=http://www.klaban.torun.pl/prog/pg2xbase/>pg2xbase</a>
                   (DBF <-> PostgreSQL)
 <li><a href=http://mdbtools.sourceforge.net/>mdbtools</a> (converts

Index: examples.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/examples.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- examples.html	23 Jan 2003 15:42:49 -0000	1.6
+++ examples.html	24 Jan 2003 10:36:58 -0000	1.7
@@ -552,6 +552,25 @@
 href=http://grass.itc.it/cgi-bin/mapserv?map=/var/www/map-script/mapserverjs.map&layer=dem>Online MapServer
 reading GRASS raster, SHAPE, GeoTIFF and PostGRASS/PostGIS data</a>
 
+<b>Add a view</b><p>
+
+Since we still have the geometry and attributes in different tables, we
+can add a 'view' onto both tables (sort of virtual table merging both).
+Note that for a 'view' MapServer 3.7 is required. If you use a version < 3.7
+you should use 'CREATE TABLE' instead:
+
+<div class="code"><pre>
+CREATE VIEW test AS select streams_pgg.id, streams_pgc.cat, streams_pgg.type, streams_pgg.geom \
+ from streams_pgg,streams_pgc WHERE streams_pgg.id = streams_pgc.id AND \
+ streams_pgc.field = 1;
+INSERT into geometry_columns values ( ' ', ' ', 'test2', 'geom', 2, -1, 'GEOMETRY' );
+</div></pre>
+
+Then change the table name in the 'mapfile' (DATA entry) to the view.
+Should work... As the 'streams' map does not have exciting attributes, you
+may calculate the length of each vector, assign it to the attributes table
+and enjoy the map queries.
+
 <hr>
 <b>Further Links:</b>
 

Index: geom_storage.html
===================================================================
RCS file: /grassrepository/web/grass51/tutorial/geom_storage.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- geom_storage.html	23 Jan 2003 15:42:49 -0000	1.5
+++ geom_storage.html	24 Jan 2003 10:36:58 -0000	1.6
@@ -218,6 +218,8 @@
 <li><a href=http://postgis.refractions.net/docs/>PostGIS manual</a><br>
 <li><a href=http://postgis.refractions.net/>PostGIS with shp2pgsql</a>:<br>
           <tt>shp2pgsql -D lakespy2 lakespy2 test > lakespy2.sql</tt>
+<li><a href=http://gdal.velocet.ca/projects/opengis/ogrhtml/drv_pg.html>ogr2ogr -
+    PostgreSQL</a>
 <li><a href=http://e00pg.sourceforge.net/>e002pg</a> (E00 to PostGIS
                   filter)
 <li><a href=http://gdal.velocet.ca/projects/opengis/>ogrinfo and





More information about the grass-web mailing list