[Qgis-user] Re: Problem using draw tool's with snap enabled

Luigi Castro Cardeles luigi.cardeles at gmail.com
Sun Jul 26 10:44:27 PDT 2009


hi,

i forget to say that the problem appear with qgis 1.1.0

best regards,
Luigi Castro Cardeles


2009/7/24 Luigi Castro Cardeles <luigi.cardeles at gmail.com>

> Hi list,
>
> i am doing some tests with the drawing tool using *versão do qgis do
> rodrigo* and snap active.
>
> I am using postgis layers (one for line and another for polygon).
>
> I have some polygon and want to draw lines on the boundary of that polygon
> (image
> http://picasaweb.google.com.br/lh/photo/S82AQ6dp00-YdDZktcIf7A?feat=directlink
> )
> At image 1 the yellow one has id=1 and the other has id=3.
>
>
> i have draw both using snap to segment to draw a line on top of polygon's
> boundary.
>
> If i use the postgis function to calculate the distance between each line
> and the polygon, i obtain strange results.
>
> 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.
>
> I do this same operations using OpenJUMP and obtain the expected result
> (zero distance for both lines).
> If i do this same operations using QGIS unstable 1.2.0, the distances are
> zero (right result).
>
> Is this a bug on 1.1.0 version?
>
>
> If i was not clear enough, please let me know what information i need to
> clarify.
>
> ----*walkthrough*----
>
> 1- create postgis tables
> CREATE TABLE line ( id integer NOT NULL,  CONSTRAINT line_id_pk PRIMARY KEY
> (id));
> CREATE TABLE polygon ( id integer NOT NULL,  CONSTRAINT polygon_id_pk
> PRIMARY KEY (id));
> SELECT addgeometrycolumn('public','line','the_geom',4326,'LINESTRING',2);
> SELECT addgeometrycolumn('public','polygon','the_geom',4326,'POLYGON',2);
>
> 2-load the layer at qgis
>
> 3-create a polygon and draw lines using the snap tool.
>
> 4-run the distance function
> SELECT id,st_distance(a.the_geom, b.the_geom) from line a, polygon b
>
>
> Thanks,
>  Luigi Castro Cardeles
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20090726/e15b24ff/attachment.html>


More information about the Qgis-user mailing list