hi,<br><br>i forget to say that the problem appear with qgis 1.1.0<br><br>best regards,<br clear="all">Luigi Castro Cardeles<br>
<br><br><div class="gmail_quote">2009/7/24 Luigi Castro Cardeles <span dir="ltr"><<a href="mailto:luigi.cardeles@gmail.com">luigi.cardeles@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi list,<br><br>i am doing some tests with the drawing tool using *versão do qgis do rodrigo* and snap active.<br><br>I am using postgis layers (one for line and another for polygon).<br><br>I have some polygon and want to draw lines on the boundary of that polygon (image <a href="http://picasaweb.google.com.br/lh/photo/S82AQ6dp00-YdDZktcIf7A?feat=directlink" target="_blank">http://picasaweb.google.com.br/lh/photo/S82AQ6dp00-YdDZktcIf7A?feat=directlink</a>)<br>


At image 1 the yellow one has id=1 and the other has id=3.<br><br><br>i have draw both using snap to segment to draw a line on top of polygon's boundary.<br><br>If i use the postgis function to calculate the distance between each line and the polygon, i obtain strange results.<br>


<br>I think that both distance's should be zero since the lines are on top of polygon boundary's but instead i get 3.53443747694303e-016 for line with id=1 (the yellow one) and get zero for line with id=3. The zero answer is right but the other one is not.<br>


<br>I do this same operations using OpenJUMP and obtain the expected result (zero distance for both lines).<br>If i do this same operations using QGIS unstable 1.2.0, the distances are zero (right result).<br><br>Is this a bug on 1.1.0 version?<br>


<br><br>If i was not clear enough, please let me know what information i need to clarify.<br><br>----<i>walkthrough</i>----<br><br>1- create postgis tables<br>CREATE TABLE line ( id integer NOT NULL,  CONSTRAINT line_id_pk PRIMARY KEY (id));<br>


CREATE TABLE polygon ( id integer NOT NULL,  CONSTRAINT polygon_id_pk PRIMARY KEY (id));<br>SELECT addgeometrycolumn('public','line','the_geom',4326,'LINESTRING',2);<br>SELECT addgeometrycolumn('public','polygon','the_geom',4326,'POLYGON',2);<br>


<br>2-load the layer at qgis<br><br>3-create a polygon and draw lines using the snap tool.<br><br>4-run the distance function<br>SELECT id,st_distance(a.the_geom, b.the_geom) from line a, polygon b<br><br><br>Thanks,<br clear="all">

<font color="#888888">
Luigi Castro Cardeles<br>
</font></blockquote></div><br>