Re: Checking for overlaps of rectangles

From: Shakespeare <whatsin_at_xs4all.nl>
Date: Mon, 06 Jul 2009 18:51:33 +0200
Message-ID: <4a522b9d$0$190$e4fe514c_at_news.xs4all.nl>



Hans Mayr schreef:
> Hello Shakespeare,
>
> Thanks for your answer. It is nice for me to read that you pointed out
> the problems I have seen and wrote about in my original message in the
> other group. Thanks for the hints, I will check Locator. And just the
> fact that there is something like the "Painter's Algorithm" shows that
> a solution is pretty complicated and that there obviously is no easy
> standard approach.
>
> Best,
>
> Hans

Well, I think that algrithm is over 25 years old, so there should be better options available now, since calculation power has grown. I recall that the algorithm was used to calculate if a graphical object was in the foreground (visible) or not. In your case, all objects should be visible, and background should be completely covered.

I checked Locator for you. Locator has 'operators' available to check whether objects have overlap or not (to be used in a where clause). Unfortunately, with Locator you can not calculate the actual overlap (size or shape), just the fact that they DO overlap.

The calculation part is in the SDO_GEOM package, which is licensed with Spatial. It is installed in each database that has Locator, but you're just not allowed to use it. Strange enough, it's even in the FREE XE database, but still: don't touch! If Oracle finds out, you have to bleed....

Shakespeare

Ever seen a car salesman selling a car with 6 speed gear telling you you're only allowed to shift from 1 up to 5, or you have to pay extra? Received on Mon Jul 06 2009 - 11:51:33 CDT

Original text of this message