[GRASS-user] v.external to layer in PostGIS database
Nikos Alexandris
nik at nikosalexandris.net
Mon May 7 03:23:26 PDT 2018
* Nikos Alexandris <nik at nikosalexandris.net> [2018-05-03 19:57:17 +0200]:
>Dear (PostGIS) data base experts,
Apologies for bringing this up again. Any idea what this error message
is about? Where to look further?
>trying to connect to an external, non-local, PostGIS layer via `v.external`,
>`db.connect -p` shows all is set. Testing via `db.test test="test1"`
>works fine, I think:
>
>```
>Using DB driver: pg
>CREATE TABLE grass_test1 (i1 INTEGER, d1 DOUBLE PRECISION, c1 VARCHAR(20))
>EXECUTE: OK
>INSERT INTO grass_test1 VALUES ( 1, 123.456, 'abcd' )
>EXECUTE: OK
>INSERT INTO grass_test1 VALUES ( 2, null, 'xxx' )
>EXECUTE: OK
>SELECT * FROM grass_test1
>EXECUTE: OK
>RESULT: OK
>SELECT c1 FROM grass_test1 WHERE d1 < 500 / 2 AND i1 <> 2 AND c1 LIKE '%bc%'
>EXECUTE: OK
>RESULT: OK
>INSERT INTO grass_test1 VALUES ( 3, 0.0, '_\''_' )
>EXECUTE: OK
>ALTER TABLE grass_test1 ADD COLUMN i2 INTEGER
>EXECUTE: OK
>UPDATE grass_test1 SET d1 = 18.6, i2 = 987 WHERE i1 = 2
>EXECUTE: OK
>SELECT * FROM grass_test1
>EXECUTE: OK
>2d1
>< 3|0|_\\'_|
>3a3
>>3|0|_\'_|
>ERROR: RESULT: ******** ERROR ********
>DROP TABLE grass_test1
>EXECUTE: OK
>```
>
>What is this "ERROR" about?
>
>Executing
>```
>v.external in=PG:dbname=SomeName layer="pa.pa_1000" out=test
>```
>
>reports only warnings:
>```
>WARNING: No key column detected.
>WARNING: Feature table <pa_1000> has no primary key defined. Unable to define
> DB links.
>..
>WARNING: Random read is not supported for this layer. Unable to build
>topology.
>v.external complete. Link to vector map <test> created.
>```
>
>Is this an "indexing" issue on the PG side?
On the PostGIS side, there are thousands of views, each one corresponds
to one boundary vector map. This has been developed so, for practical reasons,
is my understanding.
Anyone working with large vector data bases, stored in PostGIS?
Thanks again, Nikos
>
>What is wanted, actually, is to link to "external" layers, stored in a
>PostGIS data base and, subsequently, run `g.region` and `r.mask
>vector=LinkedLayer`. I have tried this steps using an external ESRI
>Shapefile, and it works. Would a PG "layer" be a problem?
>
>Thank you, Nikos
>_______________________________________________
>grass-user mailing list
>grass-user at lists.osgeo.org
>https://lists.osgeo.org/mailman/listinfo/grass-user
--
Nikos Alexandris | Remote Sensing & Geomatics
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180507/42f669ef/attachment.sig>
More information about the grass-user
mailing list