Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equivalence class errors in some spatial functions. #12

Open
Aeryka opened this issue Dec 2, 2010 · 1 comment
Open

Equivalence class errors in some spatial functions. #12

Aeryka opened this issue Dec 2, 2010 · 1 comment

Comments

@Aeryka
Copy link

Aeryka commented Dec 2, 2010

There seems to be a problem in the Intersects and Overlaps functions. select count(*) from areawater_merge a, edges_merge e where Intersects(e.shape,a.shape)=1 and e.ogr_fid=3871598\g Executing . . . E_OP0487 consistency check

no joining equivalence class found when expected

However, Intersects return value is 0: select count(*) from areawater_merge a, edges_merge e where Intersects(e.shape,a.shape)=0 and e.ogr_fid=3871598\g The same goes for the Overlaps function. On the other hand, function Contains works with both 1 and 0.

select lu.property_i from land_use_2006 as lu, s_fld_haz_ar fz where lu.general_la in (100,113,150,160,200) and (fld_zone='A' or fld_zone='AE' or fld_zone='AO' or fld_zone='V') and overlaps(lu.shape, fz.shape)=1 \g Executing . . . E_OP0889 Eqc is not available at a CO node.

However, when changing Overlaps(x,y) = 0: select lu.property_i from land_use_2006 as lu, s_fld_haz_ar fz where lu.general_la in (100,113,150,160,200) and (fld_zone='A' or fld_zone='AE' or fld_zone='AO' or fld_zone='V') and overlaps(lu.shape, fz.shape)=0 \g

@Aeryka
Copy link
Author

Aeryka commented Dec 2, 2010

Another example to be aware of.

step 1: I created three tables, using Ingres abstract spatial datatypes (i.e. polygon) as one of the columns. create table a(fid int, shape polygon(4)); create table b(fid int, shape polygon(4)); create table c(fid int, shape polygon(4));

step 2: I inserted a row into the three talbes and created R-tree index on them, respectively. insert into a values (1, '((0, 0), (2, 1), (1,3),(0,4))'); insert into b values (2, '((0, 0), (2, 0), (2,3),(0,4))'); insert into c values (3, '((0, 0), (2, 0), (2,3),(1,5))');

create index a_idx on a (shape) with structure=rtree, range=((0,0),(10,10)); create index b_idx on b (shape) with structure=rtree, range=((0,0),(10,10)); create index c_idx on c (shape) with structure=rtree, range=((0,0),(10,10)); ......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant