[postgis-users] R: postgis-users Digest, Vol 22, Issue 29
Alberto Cavalli
alberto.cavalli at sintranet.it
Thu Aug 19 07:02:47 PDT 2004
thanks a lot for the quickly answer, so, if I understand,
it should be possible. Have you ever make something like this?
-----Messaggio originale-----
Da: postgis-users-request at postgis.refractions.net
[mailto:postgis-users-request at postgis.refractions.net]
Inviato: giovedì 19 agosto 2004 15.35
A: postgis-users at postgis.refractions.net
Oggetto: postgis-users Digest, Vol 22, Issue 29
Send postgis-users mailing list submissions to
postgis-users at postgis.refractions.net
To subscribe or unsubscribe via the World Wide Web, visit
http://postgis.refractions.net/mailman/listinfo/postgis-users
or, via email, send a message with subject or body 'help' to
postgis-users-request at postgis.refractions.net
You can reach the person managing the list at
postgis-users-owner at postgis.refractions.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of postgis-users digest..."
Today's Topics:
1. Re: Polygon with holes (Paul Ramsey)
2. Re: RE: RE: [postgis-users] The operator && is not
overlapsoperatorbasedonthe OGC SF SQL (David Blasby)
3. Re: Mulitple Geometry Columns in One Table (strk at refractions.net)
4. RE: Mulitple Geometry Columns in One Table (Mark Cave-Ayland)
5. Re: Mulitple Geometry Columns in One Table (strk at refractions.net)
6. Problem with Postgis Win32 distrib (Nicolas RIBOT)
7. Is possible to make this? (Alberto Cavalli)
8. RE: Problem with Postgis Win32 distrib (Nicolas RIBOT)
9. RE: Problem with Postgis Win32 distrib (TECHER Jean David)
10. RE: Problem with Postgis Win32 distrib (TECHER Jean David)
11. Re: Is possible to make this? (strk at refractions.net)
----------------------------------------------------------------------
Message: 1
Date: Wed, 18 Aug 2004 11:55:19 -0700
From: Paul Ramsey <pramsey at refractions.net>
Subject: Re: [postgis-users] Polygon with holes
To: tuanpa at vngeobiz.com, PostGIS Users Discussion
<postgis-users at postgis.refractions.net>
Message-ID: <4123A617.9080601 at refractions.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Tuan Pham Anh wrote:
>
> Could someone show me how to insert
>
> 1. a polygon with a hole
> 2. a polygon with holes
Polygon:
POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))
Polygon with hole:
POLYGON((0 0, 0 5, 5 5, 5 0, 0 0),(1 1,1 2,2 2, 2 1, 1 1))
Polygon with holes:
POLYGON((0 0, 0 8, 8 8, 8 0, 0 0),(1 1,1 2,2 2, 2 1, 1 1),(3 3,3 4,4 4,4
3,3 3))
------------------------------
Message: 2
Date: Wed, 18 Aug 2004 12:03:49 -0700
From: David Blasby <dblasby at gmail.com>
Subject: Re: RE: RE: [postgis-users] The operator && is not
overlapsoperatorbasedonthe OGC SF SQL
To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
Message-ID: <89f845e80408181203703c1f18 at mail.gmail.com>
Content-Type: text/plain; charset=US-ASCII
> Anyway, I also found in docs the other operators like &<, &>,... which I
do
> not understand especiallyt what means left (e.g. from center of masses,
from
> the most left bbox point,...), right and how one can use them....
> Are they using index?
I would recommend that you do not use these operators!!! They're
there because the indexing mechanism requires them to be there.
You can think of them as "<", "<=", "=", ">=", ">". They're also
based on bounding boxes.
"If you use them, you'll go blind!"
dave
------------------------------
Message: 3
Date: Thu, 19 Aug 2004 10:23:41 +0200
From: strk at refractions.net
Subject: Re: [postgis-users] Mulitple Geometry Columns in One Table
To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
Message-ID: <20040819082341.GA46613 at freek.keybit.net>
Content-Type: text/plain; charset=us-ascii
On Wed, Aug 18, 2004 at 11:36:37AM +0100, Mark Cave-Ayland wrote:
[...]
> Hi strk,
>
> Could you not do something like the following:
>
> test=# select t2.oid from geometry_columns t1, pg_class t2 where
> t1.f_table_name = t2.relname;
> oid
> -------
> 19297
> 19306
> (2 rows)
>
> Then for each of theses oids (these are the oids for each table that
> appears in geometry_columns):
>
> test=# select t1.conname, t2.attname from pg_constraint t1, pg_attribute
> t2 wher
> e t1.conrelid = 19297 AND t1.conkey[1] = t2.attnum AND t2.attrelid =
> 19297;
> conname | attname
> -----------------+---------
> enforce_srid | geom
> enforce_geotype | geom
> (2 rows)
>
> ....where 'geom' is the name of the column the constraint is applied to,
> and conname is the name of the constraint.
This is derived from your suggestion, but uses SQL only and its
2 queries (one for constraint type).
It avoids querying geometry_column so to avoid messing with schema,
pgsql switches and the like.
What do you think ?
UPDATE pg_constraint
SET conname = textcat(''enforce_geotype_'', a.attname)
FROM pg_attribute a
WHERE
a.attrelid = conrelid
AND a.attnum = conkey[1]
AND c.consrc LIKE ''((geometrytype(%) = %'';
UPDATE pg_conname
SET conrelid = textcat(''enforce_srid_'', a.attname)
FROM pg_attribute a
WHERE
a.attrelid = conrelid
AND a.attnum = conkey[1]
AND c.consrc LIKE ''(srid(% = %)'';
--strk;
------------------------------
Message: 4
Date: Thu, 19 Aug 2004 10:20:41 +0100
From: "Mark Cave-Ayland" <m.cave-ayland at webbased.co.uk>
Subject: RE: [postgis-users] Mulitple Geometry Columns in One Table
To: "'PostGIS Users Discussion'"
<postgis-users at postgis.refractions.net>
Message-ID: <8F4A22E017460A458DB7BBAB65CA6AE52A586A at openmanage>
Content-Type: text/plain; charset="us-ascii"
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On
> Behalf Of strk at refractions.net
> Sent: 19 August 2004 09:24
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Mulitple Geometry Columns in One Table
>
(lots cut)
> This is derived from your suggestion, but uses SQL only and
> its 2 queries (one for constraint type). It avoids querying
> geometry_column so to avoid messing with schema, pgsql
> switches and the like.
>
> What do you think ?
>
> UPDATE pg_constraint
> SET conname = textcat(''enforce_geotype_'', a.attname)
> FROM pg_attribute a
> WHERE
> a.attrelid = conrelid
> AND a.attnum = conkey[1]
> AND c.consrc LIKE ''((geometrytype(%) = %'';
>
> UPDATE pg_conname
> SET conrelid = textcat(''enforce_srid_'', a.attname)
> FROM pg_attribute a
> WHERE
> a.attrelid = conrelid
> AND a.attnum = conkey[1]
> AND c.consrc LIKE ''(srid(% = %)'';
>
Hi strk,
Nice one! I had to tweak these a little: I had to remove the 'c' alias
(as otherwise it was matching everything in pg_constraint if I added
it?) but the following queries worked for me in psql (tested on
PG8.0b1):
test=# update pg_constraint set conname = textcat('enforce_geotype_',
a.attname) FROM pg_attribute a WHERE a.attrelid = conrelid AND a.attnum
= conkey[1] AND consrc LIKE '((geometrytype(%) = %';
test=# update pg_constraint set conname = textcat('enforce_srid_',
a.attname) FROM pg_attribute a WHERE a.attrelid = conrelid AND a.attnum
= conkey[1] AND consrc LIKE '(srid(% = %';
How does that work for you?
Mark.
---
Mark Cave-Ayland
Webbased Ltd.
Tamar Science Park
Derriford
Plymouth
PL6 8BX
England
Tel: +44 (0)1752 764445
Fax: +44 (0)1752 764446
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender. You
should not copy it or use it for any purpose nor disclose or distribute
its contents to any other person.
------------------------------
Message: 5
Date: Thu, 19 Aug 2004 11:28:16 +0200
From: strk at refractions.net
Subject: Re: [postgis-users] Mulitple Geometry Columns in One Table
To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
Message-ID: <20040819092816.GB47046 at freek.keybit.net>
Content-Type: text/plain; charset=us-ascii
On Thu, Aug 19, 2004 at 10:20:41AM +0100, Mark Cave-Ayland wrote:
>
> > -----Original Message-----
> > From: postgis-users-bounces at postgis.refractions.net
> > [mailto:postgis-users-bounces at postgis.refractions.net] On
> > Behalf Of strk at refractions.net
> > Sent: 19 August 2004 09:24
> > To: PostGIS Users Discussion
> > Subject: Re: [postgis-users] Mulitple Geometry Columns in One Table
> >
>
> (lots cut)
>
> > This is derived from your suggestion, but uses SQL only and
> > its 2 queries (one for constraint type). It avoids querying
> > geometry_column so to avoid messing with schema, pgsql
> > switches and the like.
> >
> > What do you think ?
> >
> > UPDATE pg_constraint
> > SET conname = textcat(''enforce_geotype_'', a.attname)
> > FROM pg_attribute a
> > WHERE
> > a.attrelid = conrelid
> > AND a.attnum = conkey[1]
> > AND c.consrc LIKE ''((geometrytype(%) = %'';
> >
> > UPDATE pg_conname
> > SET conrelid = textcat(''enforce_srid_'', a.attname)
> > FROM pg_attribute a
> > WHERE
> > a.attrelid = conrelid
> > AND a.attnum = conkey[1]
> > AND c.consrc LIKE ''(srid(% = %)'';
> >
>
> Hi strk,
>
> Nice one! I had to tweak these a little: I had to remove the 'c' alias
> (as otherwise it was matching everything in pg_constraint if I added
> it?) but the following queries worked for me in psql (tested on
> PG8.0b1):
>
>
> test=# update pg_constraint set conname = textcat('enforce_geotype_',
> a.attname) FROM pg_attribute a WHERE a.attrelid = conrelid AND a.attnum
> = conkey[1] AND consrc LIKE '((geometrytype(%) = %';
>
> test=# update pg_constraint set conname = textcat('enforce_srid_',
> a.attname) FROM pg_attribute a WHERE a.attrelid = conrelid AND a.attnum
> = conkey[1] AND consrc LIKE '(srid(% = %';
>
>
> How does that work for you?
>
> Mark.
Very good, I found those typos too.
I've committed the change.
Thank you.
--strk;
------------------------------
Message: 6
Date: Thu, 19 Aug 2004 15:05:46 +0200
From: "Nicolas RIBOT" <nri at scot.cnes.fr>
Subject: [postgis-users] Problem with Postgis Win32 distrib
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Message-ID: <200408191256.i7JCu2V20276 at cnes.fr>
Content-Type: text/plain; charset="iso-8859-1"
Hi all,
A question concerning the Jean-David binary postgis release
(pgsql75windev):
I followed the install instruction and unzipped files in my D:\ folder
instead of C:
Successfuly ran pg_installation.bat after having modified absolute paths
Tried to run initdb and had the following message:
--------------------------------------------------------------
initdb: file "c:/projects/build/pgsql/share/postgres.bki" does not exist
This means you have a corrupted installation or identified
the wrong directory with the invocation option -L.
--------------------------------------------------------------
Am I missing something ?
Thanx
Nicolas Ribot
------------------------------
Message: 7
Date: Thu, 19 Aug 2004 14:51:21 +0200
From: Alberto Cavalli <alberto.cavalli at sintranet.it>
Subject: [postgis-users] Is possible to make this?
To: postgis-users at postgis.refractions.net
Message-ID:
<5C364C28DF05D611A03200E01832693FC6804E at sintraweb.sintranet.it>
Content-Type: text/plain; charset="iso-8859-1"
Hi, I'm a newbye of postgis and I don't Know the potentiality of it.
I'm going to make a project where I've 10 layers: one of parcels and the
others are a simple polygon.
When I make a query on a parcel, that intersect a portion of one polygon
(one of the other 9 layers) is possible to obtain the amount of area of
parcel that is in common with the polygon?
I hope that someone can answer to my question and can tell to me the right
way to do this.
thaks in advance
Alberto
------------------------------
Message: 8
Date: Thu, 19 Aug 2004 15:10:30 +0200
From: "Nicolas RIBOT" <nri at scot.cnes.fr>
Subject: RE: [postgis-users] Problem with Postgis Win32 distrib
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Message-ID: <200408191301.i7JD0jV21107 at cnes.fr>
Content-Type: text/plain; charset="iso-8859-1"
Oops, sorry for the previous email, sent too quickly without thinking:
I found postgres.bki and explicitly put the path to this file in the
initdb command and now it works.
(initdb -L D:\pgsql75windev\share)
Nicolas
------------------------------
Message: 9
Date: Thu, 19 Aug 2004 15:01:19 +0200
From: "TECHER Jean David" <davidtecher at yahoo.fr>
Subject: RE: [postgis-users] Problem with Postgis Win32 distrib
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Message-ID: <BOEMKKGADDFLKBNAPLNMEEFBCDAA.davidtecher at yahoo.fr>
Content-Type: text/plain; charset="iso-8859-1"
Hi Nicolas
Avec initdb tu dois préciser le chemin d'accès vers le répertoire de share
de Postgresql
c'est a dire
quand tu fais initdb
supposons que tu as installé ma distribution vers d:\pgsql75windev alors tu
dois faire:
initdb -L "d:/pgsql75windev/share"
a condition bien sur que
PGDATA=d:\pgsql75windev\data
PGHOME=d:\pgsql75windev
etc....
TECHER JEAN DAVID
- Responsable Informatique 01MAP -
e-mail:davidtecher at yahoo.fr
Tél: 06 85 37 36 75
Site PostGIS: http://techer.pascal.free.fr/postgis/index.htm
> -----Message d'origine-----
> De : postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net]De la part de
> Nicolas RIBOT
> Envoyé : jeudi 19 août 2004 15:06
> À : PostGIS Users Discussion
> Objet : [postgis-users] Problem with Postgis Win32 distrib
>
>
> Hi all,
>
> A question concerning the Jean-David binary postgis release
> (pgsql75windev):
>
> I followed the install instruction and unzipped files in my D:\ folder
> instead of C:
>
> Successfuly ran pg_installation.bat after having modified absolute paths
> Tried to run initdb and had the following message:
>
> --------------------------------------------------------------
> initdb: file "c:/projects/build/pgsql/share/postgres.bki" does not exist
> This means you have a corrupted installation or identified
> the wrong directory with the invocation option -L.
> --------------------------------------------------------------
>
> Am I missing something ?
>
> Thanx
> Nicolas Ribot
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
------------------------------
Message: 10
Date: Thu, 19 Aug 2004 15:03:26 +0200
From: "TECHER Jean David" <davidtecher at yahoo.fr>
Subject: RE: [postgis-users] Problem with Postgis Win32 distrib
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Message-ID: <BOEMKKGADDFLKBNAPLNMMEFBCDAA.davidtecher at yahoo.fr>
Content-Type: text/plain; charset="iso-8859-1"
yes but creating postgis database will not work
open the file d:\pgsql75windev\lib\postgis.sql
then replace
c:/pgsql75windev/lib
by
d:/pgsql75windev/lib
TECHER JEAN DAVID
- Responsable Informatique 01MAP -
e-mail:davidtecher at yahoo.fr
Tél: 06 85 37 36 75
Site PostGIS: http://techer.pascal.free.fr/postgis/index.htm
> -----Message d'origine-----
> De : postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net]De la part de
> Nicolas RIBOT
> Envoyé : jeudi 19 août 2004 15:11
> À : PostGIS Users Discussion
> Objet : RE: [postgis-users] Problem with Postgis Win32 distrib
>
>
> Oops, sorry for the previous email, sent too quickly without thinking:
>
> I found postgres.bki and explicitly put the path to this file in the
> initdb command and now it works.
> (initdb -L D:\pgsql75windev\share)
>
> Nicolas
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
------------------------------
Message: 11
Date: Thu, 19 Aug 2004 15:32:24 +0200
From: strk at refractions.net
Subject: Re: [postgis-users] Is possible to make this?
To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
Message-ID: <20040819133224.GA48701 at freek.keybit.net>
Content-Type: text/plain; charset=us-ascii
On Thu, Aug 19, 2004 at 02:51:21PM +0200, Alberto Cavalli wrote:
> Hi, I'm a newbye of postgis and I don't Know the potentiality of it.
> I'm going to make a project where I've 10 layers: one of parcels and the
> others are a simple polygon.
> When I make a query on a parcel, that intersect a portion of one polygon
> (one of the other 9 layers) is possible to obtain the amount of area of
> parcel that is in common with the polygon?
> I hope that someone can answer to my question and can tell to me the right
> way to do this.
> thaks in advance
> Alberto
check intersection(geometry, geoemtry) and area2d(geometry).
--strk;
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
------------------------------
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
End of postgis-users Digest, Vol 22, Issue 29
*********************************************
More information about the postgis-users
mailing list