Fwd: Re: [Qgis-developer] bug when drawing a linestring with
two consecutive, identical points
Stefanie Tellex
stefie10 at media.mit.edu
Fri Apr 4 13:43:09 EDT 2008
Hi Marco,
I see the bug when:
* Only "Fix problems with unfilled polygons is checked"
It goes away when:
* "Make lines appear less jagged" is checked.
* None of the three rendering checkbxes are selected. (But rendering
takes forever.)
I run Debian GNU/Linux with libqt 4.3.3-2. When I upgraded to 4.3.4-2,
it still had the problem.
I submitted a bug report to Qt.
Stefanie
Marco Hugentobler wrote:
> Hi Stefanie,
>
> This may depend on the platform and also the Qt paint device you are using.
> Could you try to change the rendering options (options -> Rendering -> Make
> lines appear less jagged.../Fix problems with incorrectly ....)? For the
> first option, QGIS draws to a QImage and for the second option to a QPixmap.
>
> With the configuration I have (Linux, Qt 4.3.4), drawing a line with two
> consecutive points seems to work fine with both options. Also the coordinates
> in the example drawed correctly.
>
> The workaround you provide is a good short-term fix.
> I think it is best not to commit it to svn as the problem seems to be a Qt bug
> on a specific platform/paint device.
>
> Regards,
> Marco
>
> Am Freitag 04 April 2008 04:14:23 schrieb Stefanie Tellex:
>> Hi,
>>
>> When I have a line string with two identical points in a row, and
>> they're not the first or the last point, qgis draws an extra line to the
>> upper left hand corner of the drawing space. (This line string, for
>> example, causes that to happen: 'LINESTRING(0 0, 0 1, 0 1, 1 1)')
>> In my domain, it makes perfect sense for two consecutive points to be
>> identical, and it seems like QGIS should draw it correctly.
>>
>> It looks like the draw code in qgsvectorlayer loads the line string into
>> a QPolygonF before it gets drawn, so I think the bug might be there, but
>> I didn't track it down exactly. However, the attached patch does make it
>> go away. It works by modifying a point by an epsilon, if the previous
>> point was identical. I'm not sure if this is the best fix, but
>> deleting the point seemed bug-prone.
>>
>> Stefanie
>
>
>
More information about the Qgis-developer
mailing list