Quantcast

Re: jts 1.8 DistanceOp Closest Points question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jts 1.8 DistanceOp Closest Points question

Larry Becker
Hi,

  The case you describe often occurs when the closest point is not on a polygon point, but falls on the line between two polygon points.  In this case, the likelihood that the computed point will fall exactly on the boundary of the polygon is not good.  Because of the inaccuracy of floating point calculations, it it much more likely that the point will be slightly outside or inside the polygon.

regards,
Larry Becker

On Fri, Nov 7, 2008 at 5:14 AM, Öge Bozyigit <[hidden email]> wrote:
Hi,

I had a question regarding the Closest Point function in jts 1.8...I
performed the function on a circular polygon with a large number of
points and a simple polygon with 4-6 points. The point that is
returned for the circular polygon however is not located on the
polygon. So when an intersection query is  performed between the point
and the circular polygon it comes back false.

This only happens occasionally though I haven't figured out the
pattern yet. Has anyone else come across this? I can send the WKT of
both polygons if anyone is
interested.

--oge
_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel



--
http://amusingprogrammer.blogspot.com/

_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: jts 1.8 DistanceOp Closest Points question

Martin Davis
Larry's probably got it - but post the WKT if you want confirmation.

Larry Becker wrote:

> Hi,
>
>   The case you describe often occurs when the closest point is not on
> a polygon point, but falls on the line between two polygon points.  In
> this case, the likelihood that the computed point will fall exactly on
> the boundary of the polygon is not good.  Because of the inaccuracy of
> floating point calculations, it it much more likely that the point
> will be slightly outside or inside the polygon.
>
> regards,
> Larry Becker
>
> On Fri, Nov 7, 2008 at 5:14 AM, Öge Bozyigit <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     I had a question regarding the Closest Point function in jts 1.8...I
>     performed the function on a circular polygon with a large number of
>     points and a simple polygon with 4-6 points. The point that is
>     returned for the circular polygon however is not located on the
>     polygon. So when an intersection query is  performed between the point
>     and the circular polygon it comes back false.
>
>     This only happens occasionally though I haven't figured out the
>     pattern yet. Has anyone else come across this? I can send the WKT of
>     both polygons if anyone is
>     interested.
>
>     --oge
>     _______________________________________________
>     jts-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://lists.refractions.net/mailman/listinfo/jts-devel
>
>
>
>
> --
> http://amusingprogrammer.blogspot.com/
> ------------------------------------------------------------------------
>
> _______________________________________________
> jts-devel mailing list
> [hidden email]
> http://lists.refractions.net/mailman/listinfo/jts-devel
>  

--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel
Loading...