[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] Strange behavior with a polygon and line that claim
From:       Bryan Montgomery <monty () english ! net>
Date:       2011-01-26 13:17:28
Message-ID: AANLkTik0VyJ0kiB=Dmn7u9zpEmG27uo8U-gtXBiyRPhv () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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.
*>>* _______________________________________________
*

[Attachment #5 (text/html)]

<pre>Thanks Nicklas,<br>I suspected something like that - but our custom vi=
ewer doesn&#39;t show the polygon that way .... I&#39;ll try udig and faili=
ng that QGIS and see if we can clean up the polygon.<br><br>Bryan.<br><br>

&gt;Well, I looked at it in QGIS and the line seems to cross the border of<=
br>&gt;the polygon. I have attached the part of the polygon where it crosse=
s,<br>&gt;with the line in violet and the intersecting part in green.<br>

&gt;<br>&gt;/Nicklas<br>&gt;<br>&gt;On Tue, 2011-01-25 at 15:00 -0500, Brya=
n Montgomery wrote:<br>&gt;&gt;<i> Hello,<br></i>&gt;&gt;<i> Is there a way=
 to debug a problem I have with a polygon and line? I<br></i>&gt;<i>&gt; wa=
s running a query that used st_intersects and st_intersection to get<br>

</i>&gt;<i>&gt; the length of lines that are within the polygon. I was spot=
 checking<br></i>&gt;<i>&gt; some of the data and came up with a particular=
ly strange example.<br></i>&gt;<i>&gt; <br></i>&gt;<i>&gt; Visually, the po=
lygon looks as it should, the line clearly appears to<br>

</i>&gt;<i>&gt; be completely contained within the polygon however st_cross=
es returns<br></i>&gt;<i>&gt; true and intersection returns a subset of the=
 line. I&#39;ve tried this on<br></i>&gt;<i>&gt; postgis version 1.3 and 1.=
4 and both behave the same. I&#39;m inclined to<br>

</i>&gt;<i>&gt; believe there is a stray point but given the polygon 2,700+=
 points I&#39;m<br></i>&gt;<i>&gt; not sure how I find it! I suppose it&#39=
;s possible that there is a bug -<br></i>&gt;<i>&gt; or maybe I&#39;m just =
completely missing something.<br>

</i>&gt;<i>&gt; <br></i>&gt;<i>&gt; I tried finding the closest point on th=
e polygon to the line - but<br></i>&gt;<i>&gt; when I tried to find a way t=
o do this it seemed that the suggestions<br></i>&gt;<i>&gt; were for findin=
g the closest point when the other point was outside<br>

</i>&gt;&gt;<i> the polygon?<br></i>&gt;&gt;<i> <br></i>&gt;&gt;<i> Appreci=
ate any help,<br>&gt;&gt;</i><i> <br></i>&gt;&gt;<i> Thanks - Bryan.<br></i=
>&gt;&gt;<i> _______________________________________________<br></i></pre>



_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic