Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Find intersecting rectangles from a set of rectangles given query rectangle

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Find intersecting rectangles from a set of rectangles given query rectangle


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Find intersecting rectangles from a set of rectangles given query rectangle
  • Date: Wed, 24 Oct 2018 09:03:54 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:fE3iMxEHf3WM/osaWInLdJ1GYnF86YWxBRYc798ds5kLTJ7zoc+wAkXT6L1XgUPTWs2DsrQY07WQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDiwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KOSMn/mHZisJ+j6xVrxyuqBN934HZe5uaOOZkc67HYd8XS2hMU8BMXCJBGIO8aI4PAvIdMOZesob9vUUBogGlBQKxBO3g0CRHhmX33aYn1OkuCwfG0xE6H90QqnvUt8/5NKkIXu+u1qnIzC7Ob/xI1jf67YjHbAwhoeuMXLJ+a8Xe1VUvFwTfjlSQs4DqIzSV1uEUvmWd8uFuW+Wvi2s9pAFwpDii3sEshZPSiY0OzlDL6z91z5oyJd29UEJ0fdGkH4FUty2AMIt2WMwiTmd1syg50r0LoYO3cSoJxZg9yRPSZeaLf5WV7h7+TuqdPDR1iG59dL6hnRq+7EitxvfhWsS70FtGtDRJn9fDu30Lyhfd8NKISuFn8UekwTuP1x7c6uVDIU0siKbXMZshwrktmpcRv0nPBCr2l1/3jK+Sb0kk/fWo6/j9brXhuJ+cN5V4igfgPaQygsC/AOI4PRYSX2WD5Oix1r7u8Vf3TbhElPE6j7TVvI3AKcgGpaO1HxdZ0oM55Ba+Czem3s4YnX4CLF9dYh2HiZXmO0vQL//iFvezmVqsny1wyPDcP73sGZrNIWbEkLfkY7l991RcyQo9zd9F+51UFrYBIOjzW0PrqNPYCRo5PxSuw+n7ENV9yp8eWWWXD6CFP6Pdq1uI6vsyLOmNf48apCv9K+M+5/P1ln84mVodfbGz0pcNaXC4GO5mI0SDbnb2jNcBCzRCgg1rR+PjjBiOUCVYem2pd6M6/DAyToy8XqnZQYX4qbqNxiqyBdV4b2pcCxjYGHHkbYiNQLECYSiII+dunzsBWKS7WoEo3g2prh68wL1ieLmHshYEvI7ugYAmr9bYkgs/oGQtXpatllqVRmQxpVsmAjo/3aRxu0t4kA7R3qV/hvFED81d7vhVVR0rc5Xbyr4iUoygakf6Zt6MDW2ebJC+GzhrF4A+ztgLblpnCturhQzExTvsCLgQxeTSWc4Et5nE1n20HP5TjnbL0K570Qt/BM5IbDL9wKt29gyWAJPV1UKHl+CseLhOhCM=

You can also use the Segment Trees

https://doc.cgal.org/latest/SearchStructures/index.html#secsegment_trees

They have a poly logarithmic query time, but the constants in theĀ  O() are rather high.

Best,

Andreas


On 10/24/2018 8:59 AM, Sebastien Loriot (GeometryFactory) wrote:
You can use this package:
https://doc.cgal.org/latest/Box_intersection_d/index.html

HTH,

Sebastien.

On 10/24/2018 01:27 AM, vokuheila wrote:
Hi CGAL discuss!

I have a task on hand: Given a set of axis-aligned 2D rectangles and a query
axis-aligned 2D rectangle, efficiently (better than O(n)) *find the subset
of rectangles that intersect the query rectangle*.

Is there some data structure in CGAL that can help with this? I looked over
the documentation and it seems that most of the search/indexing structures
work with *point sets* and not more general shapes.

I heard there is *R-tree* that can do this kind of polygon indexing for fast
intersection queries. Does CGAL have something like that or equivalent? Or
is some other approach available?

Thanks guys!!

Duane



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/



-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri



Archive powered by MHonArc 2.6.18.

Top of Page