Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] polygon and polygon spatial relation

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] polygon and polygon spatial relation


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] polygon and polygon spatial relation
  • Date: Thu, 23 Feb 2012 10:21:02 +0100

I think the most efficient way to do it to first construct an
arrangement for the first polygon and check whether any
point of the second polygon is inside the other. If so then use the
do_intersect function with the other polygon as curve (x-monotone curve
will be all segments)

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Arrangement_on_surface_2_ref/Function_do_intersect.html

You should be able to use the Arr_polyline_traits_2

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Arrangement_on_surface_2_ref/Class_Arr_polyline_traits_2.html#Cross_link_anchor_1234

see also main chapter:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Arrangement_on_surface_2/Chapter_main.html

Sebastien.

On 02/23/2012 10:06 AM, cnng0315 wrote:
in cgal, there are methods to predicate whether a point is inside a polygon,
But is there any method to check whether a polygon is inside a polygon.
I can use cgal's bool-operation module to solve this, but I believe this is
not effectient, can any one give me some idea?

-----
technology change life!
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/polygon-and-polygon-spatial-relation-tp4413255p4413255.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.16.

Top of Page