Skip to Content.
Sympa Menu

cgal-discuss - RE: [cgal-discuss] Distance between a point set and a point not in it or in another point set

Subject: CGAL users discussion list

List archive

RE: [cgal-discuss] Distance between a point set and a point not in it or in another point set


Chronological Thread 
  • From: Philippe GAMBRON <>
  • To: <>
  • Subject: RE: [cgal-discuss] Distance between a point set and a point not in it or in another point set
  • Date: Wed, 26 Jan 2011 19:32:48 +0100

Thank you very much for your suggestions. This is the sort of thing I was
looking for. I will explore all that because I am only a beginner.

Best regards,

Philippe


-----Original message-----
To:
;

From: Sebastien Loriot (GeometryFactory)
<>
Sent: Wed 26-01-2011 17:47
Subject: Re: [cgal-discuss] Distance between a point set and a point
not in it or in another point set
> Philippe GAMBRON wrote:
> > Hi Sébastien,
> >
> > Thank you very much for your quick reply.
> >
> >
> >> For your first question using k-nearest neighbor search with k=1 will
> >> make it (insert your points in the tree and make the query with your
> >> point). See example here:
> >>
> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Spatial_searching/Chapter
> >> _main.html#Subsection_59.3.1
> >
> > This is what I was looking for.
> >
> >
> >> For the second one, a naive method is to use the first method
> >> iteratively over all the points of one set and take the pair with
> >> smallest distance. If you have performance issues, probably filtering
> >> points with bbox should be more efficient.
> >
> One idea is to use one kd-tree for each point set and to compare
> distances between bboxes (since it is bounding the distance between
> points contained).
>
> The walk on nodes of a kd-tree is an advanced feature.
>
> Doc of the tree (use root() method to get the first node):
> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Spatial_searching_ref/Cla
> ss_Kd_tree.html#Cross_link_anchor_1622
> Doc of the node class:
> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Spatial_searching_ref/Cla
> ss_Kd_tree_node.html#Cross_link_anchor_1623
>
> S.
>
> > I will explore that because I have indeed performance issues.
> >
> > Thank you!
> >
> > Best regards,
> >
> > Philippe
> >
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
>



Archive powered by MHonArc 2.6.16.

Top of Page