Subject: CGAL users discussion list
List archive
- From: Helmi Ben Hmida <>
- To:
- Cc: Andreas Fabri <>
- Subject: Re: [cgal-discuss] polygon and polygon spatial relation
- Date: Thu, 23 Feb 2012 10:50:41 +0100
Hi,
I´m working in depth for this problematic.
The professional and most correct solution is to be based on the 9 Intersection Model (9 IM) to qualify that two PolyGon intersects. The 9 IM are based on intersection between the interior, the exterior and the boubdary of each geometry. More information can be found in http://www.fergi.uni-osnabrueck.de/module/geodstd/inhalt/8/10.html
Best
H.
Am 23.02.2012 10:44, schrieb Andreas Fabri:
In case your two polygons are of more or less equal size
or in case there is not one polygon on that you query
again and again, you might find out if one point lies
inside, and if that is not the case detect if there
is any segment segment intersecion using the package
"Intersecting Sequences of dD Iso-oriented Boxes"
www.cgal.org/Pkg/BoxIntersectionD
andreas
On 23/02/2012 10:21, Sebastien Loriot (GeometryFactory) wrote:
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.
--
BEN HMIDA, Helmi
i3mainz - Institut für Raumbezogene Informations- und Messtechnik
Fachhochschule Mainz - University of Applied Sciences
Lucy-Hillebrand-Str. 2, 55128 Mainz
Raum D0.02
Tel: +49 (0)6131 628 1488
Fax: +49 (0)6131 628 91488
http://www.i3mainz.fh-mainz.de
- [cgal-discuss] polygon and polygon spatial relation, cnng0315, 02/23/2012
- Re: [cgal-discuss] polygon and polygon spatial relation, Sebastien Loriot (GeometryFactory), 02/23/2012
- Re: [cgal-discuss] polygon and polygon spatial relation, Andreas Fabri, 02/23/2012
- Re: [cgal-discuss] polygon and polygon spatial relation, Helmi Ben Hmida, 02/23/2012
- Re: [cgal-discuss] polygon and polygon spatial relation, Andreas Fabri, 02/23/2012
- Re: [cgal-discuss] polygon and polygon spatial relation, Sebastien Loriot (GeometryFactory), 02/23/2012
Archive powered by MHonArc 2.6.16.