Re: [postgis-users] relationship functions not working well

2008-12-05 Thread William Kyngesburye
average: 380 ms intersect average: 1100 ms && + relate average: 7200 ms intersect + relate average: 7900 ms -Original Message- From: [EMAIL PROTECTED] on behalf of William Kyngesburye Sent: Fri 12/5/2008 5:34 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] relat

RE: [postgis-users] relationship functions not working well

2008-12-05 Thread Obe, Regina
2/5/2008 5:34 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] relationship functions not working well From what I read in the docs, Intersects first checks the bbox, then does the full intersect test. While && just does a bbox test. && + st_relate gives me what I

Re: [postgis-users] relationship functions not working well

2008-12-05 Thread William Kyngesburye
ailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2008 4:33 PM To: 'PostGIS Users Discussion' Subject: RE: [postgis-users] relationship functions not working well William, Skip the intersects and use && instead (or just use ST_Intersects which has && embedded in it).

RE: [postgis-users] relationship functions not working well

2008-12-05 Thread Paragon Corporation
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Kyngesburye Sent: Friday, December 05, 2008 2:31 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] relationship functions not working well On Dec 5, 2008, at 1:02 PM, Paul Ramsey wrote: &

RE: [postgis-users] relationship functions not working well

2008-12-05 Thread Paragon Corporation
ECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Kyngesburye Sent: Friday, December 05, 2008 2:31 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] relationship functions not working well On Dec 5, 2008, at 1:02 PM, Paul Ramsey wrote: > add > > wkb_geometry && SetSRI

Re: [postgis-users] relationship functions not working well

2008-12-05 Thread William Kyngesburye
On Dec 5, 2008, at 1:02 PM, Paul Ramsey wrote: add wkb_geometry && SetSRID('BOX3D(-162 55,-161 56)'::box3d,4326) to your where clause to engage the index. P Do you mean just that, without the st_relate? That gives exactly the same results as st_intersects, though may be a little faster si

Re: [postgis-users] relationship functions not working well

2008-12-05 Thread Paul Ramsey
add wkb_geometry && SetSRID('BOX3D(-162 55,-161 56)'::box3d,4326) to your where clause to engage the index. P On Fri, Dec 5, 2008 at 10:26 AM, William Kyngesburye <[EMAIL PROTECTED]> wrote: > On Dec 5, 2008, at 11:22 AM, Martin Davis wrote: > >> Good news! I thought about this some more overni

Re: [postgis-users] relationship functions not working well

2008-12-05 Thread Martin Davis
Yep, relate doesn't automatically use the spatial index. You could also use the && operator as a filter condition - that will avoid running intersects unecessarily. William Kyngesburye wrote: On Dec 5, 2008, at 11:22 AM, Martin Davis wrote: Good news! I thought about this some more overnigh

Re: [postgis-users] relationship functions not working well

2008-12-05 Thread William Kyngesburye
On Dec 5, 2008, at 11:22 AM, Martin Davis wrote: Good news! I thought about this some more overnight, and I realized that the relation "interior-intersects" should produce the result you're looking for. This still doesn't have a named predicate, but the really good news is that the IM pat

Re: [postgis-users] relationship functions not working well

2008-12-05 Thread Martin Davis
Good news! I thought about this some more overnight, and I realized that the relation "interior-intersects" should produce the result you're looking for. This still doesn't have a named predicate, but the really good news is that the IM pattern for this is trivial: [T] . (Exercise l

Re: [postgis-users] relationship functions not working well

2008-12-05 Thread Nicolas Ribot
> This relation has quite a complex expression in terms of the IM pattern > languge. It is: > > [T] or [*T***] or [***T*] or [T] > and not ( [FT***] or [F**T*] or [F***T] ) > > This is equivalent to: > > not ([FF*FF] or [FT***] or [F**T*] or [F***T*

Re: [postgis-users] relationship functions not working well

2008-12-04 Thread William Kyngesburye
On Dec 4, 2008, at 7:23 PM, Martin Davis wrote: It sounds like you want the relationship "intersects-and-not- touches" - does that sound right? Sounds right, given the way these functions appear to behave. This relation has quite a complex expression in terms of the IM pattern languge. It

Re: [postgis-users] relationship functions not working well

2008-12-04 Thread Martin Davis
It sounds like you want the relationship "intersects-and-not-touches" - does that sound right? This relation has quite a complex expression in terms of the IM pattern languge. It is: [T] or [*T***] or [***T*] or [T] and not ( [FT***] or [F**T*] or [F***T]

Re: [postgis-users] relationship functions not working well

2008-12-04 Thread Dylan Beaudette
Can you show us your queries? Some of these examples look a little funny -- i.e. did you query contain the ST_xxx() function in the JOIN condition and the gometry construction? -- like this: select st_intersection(a,b) from t1 join t2 on st_intersects(a,b) ; Dylan On Thursday 04 December 2008

Re: [postgis-users] relationship functions not working well

2008-12-04 Thread Nicolas Ribot
> When I was debugging my invalid geometry problem, I needed to select a small > area to view. The data is divided up into 1 degree tiles (it's the SRTM > SWBD shapefiles imported). I figured selecting by whole integer degrees > would be simple to deal with. > > I started with st_overlaps(), as i

Re: [postgis-users] relationship functions not working well

2008-12-04 Thread William Kyngesburye
On Dec 4, 2008, at 2:11 PM, Nicolas Ribot wrote: Did I miss an obvious function, or is there something that will get what I want? hmmm, maybe a combination (but would that slow it down a lot)? Hi William, Did you try st_relate() the the appropriate DE-9IM matrix ? I can't give you the pat

Re: [postgis-users] relationship functions not working well

2008-12-04 Thread William Kyngesburye
On Dec 4, 2008, at 3:07 PM, Dylan Beaudette wrote: Can you show us your queries? Some of these examples look a little funny -- i.e. did you query contain the ST_xxx() function in the JOIN condition and the gometry construction? -- like this: select st_intersection(a,b) from t1 join t2 on st