[postgis-users] Strange behavior with a polygon and line that claim to intersect ....

Bryan Montgomery monty at english.net
Wed Jan 26 05:17:28 PST 2011


Thanks Nicklas,
I suspected something like that - but our custom viewer doesn't show
the polygon that way .... I'll try udig and failing that QGIS and see
if we can clean up the polygon.

Bryan.


>Well, I looked at it in QGIS and the line seems to cross the border of
>the polygon. I have attached the part of the polygon where it crosses,
>with the line in violet and the intersecting part in green.

>
>/Nicklas
>
>On Tue, 2011-01-25 at 15:00 -0500, Bryan Montgomery wrote:
>>* Hello,
*>>* Is there a way to debug a problem I have with a polygon and line? I
*>*> was running a query that used st_intersects and st_intersection to get
*>*> the length of lines that are within the polygon. I was spot checking
*>*> some of the data and came up with a particularly strange example.
*>*>
*>*> Visually, the polygon looks as it should, the line clearly appears to
*>*> be completely contained within the polygon however st_crosses returns
*>*> true and intersection returns a subset of the line. I've tried this on
*>*> postgis version 1.3 and 1.4 and both behave the same. I'm inclined to
*>*> believe there is a stray point but given the polygon 2,700+ points I'm
*>*> not sure how I find it! I suppose it's possible that there is a bug -
*>*> or maybe I'm just completely missing something.
*>*>
*>*> I tried finding the closest point on the polygon to the line - but
*>*> when I tried to find a way to do this it seemed that the suggestions
*>*> were for finding the closest point when the other point was outside
*>>* the polygon?
*>>*
*>>* Appreciate any help,
>>**
*>>* Thanks - Bryan.
*>>* _______________________________________________
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110126/65aaedea/attachment.html>


More information about the postgis-users mailing list