[GRASS-CVS] markus: grass6/db/drivers/postgres grass-pg.html,
1.1.2.1, 1.1.2.2
grass at intevation.de
grass at intevation.de
Sat Nov 24 07:41:12 EST 2007
- Previous message: [GRASS-CVS] markus: grass6/db/drivers/postgres grass-pg.html, 1.3,
1.3.2.1
- Next message: [GRASS-CVS] markus: grass6/db/drivers/sqlite create_table.c, 1.2,
1.2.4.1 db.c, 1.3, 1.3.4.1 describe.c, 1.4.4.2,
1.4.4.3 execute.c, 1.4.4.1, 1.4.4.2 fetch.c, 1.3.4.3,
1.3.4.4 grass-sqlite.html, 1.1.2.3, 1.1.2.4 index.c, 1.2,
1.2.4.1 listtab.c, 1.3.4.1, 1.3.4.2 proto.h, 1.1,
1.1.4.1 select.c, 1.5.4.1, 1.5.4.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: markus
Update of /grassrepository/grass6/db/drivers/postgres
In directory doto:/tmp/cvs-serv16518
Modified Files:
Tag: releasebranch_6_2
grass-pg.html
Log Message:
PostGIS example added (thanks to Horst Düster) (merge from HEAD)
Index: grass-pg.html
===================================================================
RCS file: /grassrepository/grass6/db/drivers/postgres/grass-pg.html,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- grass-pg.html 24 Aug 2006 19:11:36 -0000 1.1.2.1
+++ grass-pg.html 24 Nov 2007 12:41:10 -0000 1.1.2.2
@@ -70,7 +70,40 @@
<h2>PostGIS: PostgreSQL with vector geometry</h2>
<a href=http://postgis.refractions.net/>PostGIS</a>:
-add geographic object support to PostgreSQL.
+adds geographic object support to PostgreSQL.
+
+<h3>Example: Import from PostGIS</h3>
+
+In an existing PostGIS database, create the following table:
+
+<div class="code"><pre>
+CREATE TABLE test
+(
+ id serial NOT NULL,
+ mytime timestamp DEFAULT now(),
+ text varchar,
+ wkb_geometry geometry,
+ CONSTRAINT test_pkey PRIMARY KEY (id)
+) WITHOUT OIDS;
+
+# insert value
+INSERT INTO test (text, wkb_geometry)
+ VALUES ('Name',geometryFromText('POLYGON((600000 200000,650000
+ 200000,650000 250000,600000 250000,600000 200000))',-1));
+
+# register the table with geometry
+select AddGeometryColumn ('postgis', 'test', 'geometry', -1, 'GEOMETRY', 2);
+</pre></div>
+
+GRASS can import this PostGIS polygon map as follows:
+
+<div class="code"><pre>
+v.in.ogr dsn="PG:host=localhost dbname=postgis user=neteler" layer=test \
+ output=test type=boundary,centroid
+v.db.select test
+v.info -t test
+</pre></div>
+
<h4>Geometry Converters</h4>
<ul>
- Previous message: [GRASS-CVS] markus: grass6/db/drivers/postgres grass-pg.html, 1.3,
1.3.2.1
- Next message: [GRASS-CVS] markus: grass6/db/drivers/sqlite create_table.c, 1.2,
1.2.4.1 db.c, 1.3, 1.3.4.1 describe.c, 1.4.4.2,
1.4.4.3 execute.c, 1.4.4.1, 1.4.4.2 fetch.c, 1.3.4.3,
1.3.4.4 grass-sqlite.html, 1.1.2.3, 1.1.2.4 index.c, 1.2,
1.2.4.1 listtab.c, 1.3.4.1, 1.3.4.2 proto.h, 1.1,
1.1.4.1 select.c, 1.5.4.1, 1.5.4.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the grass-commit
mailing list