https://issues.qgis.org/https://issues.qgis.org/favicon.ico2011-03-23T13:58:00ZQGIS Issue TrackingQGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244602011-03-23T13:58:00ZMarco Hugentoblermarco.hugentobler@sourcepole.ch
<ul></ul><p>Is this only for vertical lines or for others too? Could you attach a small testdataset to reproduce the problem?</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244612011-03-24T00:10:58ZSandro Santillistrk@kbt.io
<ul></ul><p>Seems to be vertical lines only.<br />I attach a shapefile. Turn on arrows decoration on symbology-ng and orientation symbol on labels. Arrow decorations are correct.</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244622011-03-24T08:24:15ZMarco Hugentoblermarco.hugentobler@sourcepole.ch
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>fixed</i></li></ul><p>Fixed in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/76d0e28db36031535aa9c5be0786b8a669de31c3" title="Fix for ticket #3643, direction symbol of label git-svn-id: http://svn.osgeo.org/qgis/trunk@1559...">76d0e28d</a> (SVN r15592)</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244632011-03-29T03:20:40ZSandro Santillistrk@kbt.io
<ul><li><strong>Resolution</strong> deleted (<del><i>fixed</i></del>)</li><li><strong>Status</strong> changed from <i>Closed</i> to <i>Feedback</i></li></ul><p>Indeed <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/76d0e28db36031535aa9c5be0786b8a669de31c3" title="Fix for ticket #3643, direction symbol of label git-svn-id: http://svn.osgeo.org/qgis/trunk@1559...">76d0e28d</a> (SVN r15592) fixed the attached edge.zip case, but it's still wrong for another dataset :/<br />I'm attaching it..</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244642011-03-29T03:26:13ZSandro Santillistrk@kbt.io
<ul></ul><p>In particular, edges with id 5 and 7 of qgisbug3543_1.zip are disagreed upon between label and line decoration. They are both going down, so line decoration is correct and label orientation symbol is wrong.</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244652011-03-29T03:27:05ZSandro Santillistrk@kbt.io
<ul></ul><p>I'd add that the original testcase only contained lines oriented from bottom up, which may explain why this case wasn't cought.</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244662011-03-29T03:54:21ZSandro Santillistrk@kbt.io
<ul></ul><p>The attached patch (bug3643.diff) fixes it for me, for both datasets.<br />Might not be extremely elegant, but should be also more robust..</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244672011-03-29T03:59:49ZSandro Santillistrk@kbt.io
<ul></ul><p>A slightly more elegant version:</p>
<pre>
diff --git a/src/core/pal/feature.cpp b/src/core/pal/feature.cpp
index 6f657b1..5501434 100644
--- a/src/core/pal/feature.cpp
+++ b/src/core/pal/feature.cpp
@@ -596,7 +596,7 @@ namespace pal
{
//std::cout << alpha*180/M_PI << std::endl;
if ( flags & FLAG_MAP_ORIENTATION )
- reversed = ( alpha > M_PI / 2 || alpha < -M_PI / 2 );
+ reversed = ( (ex == bx && ey < by ) || ( alpha > M_PI / 2 || alpha < -M_PI / 2 ) );
if (( !reversed && ( flags & FLAG_ABOVE_LINE ) ) || ( reversed && ( flags & FLAG_BELOW_LINE ) ) )
positions->push_back( new [[LabelPosition]]( i, bx + cos( beta ) *distlabel , by + sin( beta ) *distlabel, xrm, yrm, alpha, cost, this, reversed ) ); // Line
</pre> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244682011-03-29T04:26:15ZSandro Santillistrk@kbt.io
<ul></ul><p>Even smaller is just moving re-adding the equal sign but to the right part:</p>
<pre>
- reversed = ( alpha > M_PI / 2 || alpha < -M_PI / 2 );
+ reversed = ( alpha > M_PI / 2 || alpha <= -M_PI / 2 );
</pre>
<p>Works fine in my case, altought the equality comparison between the return from atan2 and M_PI/2 looks scary (miracles!)</p>
<p>This final version seems to be the closest to the original code, where the equal sign was in the first rather than second side of ||.</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244692011-03-29T06:52:26ZMarco Hugentoblermarco.hugentobler@sourcepole.ch
<ul><li><strong>Resolution</strong> set to <i>fixed</i></li><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul><p>Applied the second version in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/9a167ba0949268035f3255e418ab3ab6408282f1" title="Applied modification from strk to fix label direction, ticket #3643 git-svn-id: http://svn.osgeo...">9a167ba0</a> (SVN r15638). Thanks!</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=244702011-03-29T08:25:35ZSandro Santillistrk@kbt.io
<ul></ul><p>Great. I confirm the fix. You can close the grave now :)</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=251672011-07-08T03:53:13ZMayeul Kauffmann
<ul><li><strong>Resolution</strong> deleted (<del><i>fixed</i></del>)</li><li><strong>File</strong> <a href="/attachments/download/3328/line-driven_label_orientation.png">line-driven_label_orientation.png</a> added</li></ul><p>Hi, <br />The bug is fixed only when the radio button "Orientation" is set to "map", not "line".<br />There are two ways to fix this:<br />1. Rotate 180° the label and the arrow (write upside down)<br />2. Reverse the arrow ">" only</p>
<p>I would strongly suggest solution 1. This would allow to follow a frequent cartographic convention for contour lines: put number written uphill (see attached screenshot): this is used on all official French topographic map by the IGN. This seems logical even just by reading the QGIS dialog box: "Orientation"</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=251682011-07-08T03:54:33ZMayeul Kauffmann
<ul><li><strong>File</strong> <a href="/attachments/download/3329/test_label_orientation.qgs">test_label_orientation.qgs</a> added</li></ul> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=251702011-07-08T03:56:53ZMayeul Kauffmann
<ul><li><strong>File</strong> <a href="/attachments/download/3330/test_label_orientation.sqlite">test_label_orientation.sqlite</a> added</li></ul> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=260382011-10-22T00:51:17ZSandro Santillistrk@kbt.io
<ul><li><strong>Pull Request or Patch supplied</strong> set to <i>No</i></li></ul><p>Mayeul: I've filed <a class="issue tracker-1 status-5 priority-4 priority- closed" href="https://issues.qgis.org/issues/4424" title="Label orientation is limited in the left-to-right range (Closed)">#4424</a> for your request. This bug was specifically about the "Add direction symbol".</p>
<p>By the way, now that I try enabling that it seems to be not working anymore ?!</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=260392011-10-22T00:55:13ZSandro Santillistrk@kbt.io
<ul><li><strong>Target version</strong> changed from <i>Version 1.7.0</i> to <i>Version 1.7.1</i></li><li><strong>Must fix</strong> changed from <i>No</i> to <i>Yes</i></li></ul><p>Gah. I confirm this is still broken.</p>
<p>First of all direction symbol is only shown with with "parallel" placement (nothing shown with "curved" or "horizontal").</p>
<p>Second, the bug is still there when orientation is "line" rather than "map".</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=260502011-10-22T04:07:41ZSandro Santillistrk@kbt.io
<ul></ul><p>How do we reopen this bug ? I personally can't change the "Status" field.</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=260512011-10-22T04:12:20ZSandro Santillistrk@kbt.io
<ul></ul><p>I don't really get the meaning of "Map" vs. "Line" orientation, btw</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=260522011-10-22T04:19:43ZSandro Santillistrk@kbt.io
<ul></ul><p>The following changes since commit 59be561a4d9100fb2084006c2acc7df5798c52fc:<br /> Juergen E. Fischer (1):<br /> fix warnings and more cosmetics</p>
<p>are available in the git repository at:</p>
<pre><code><a class="email" href="mailto:git@github.com">git@github.com</a>:strk/Quantum-GIS.git dirsym</code></pre>
<p>Sandro Santilli (1):<br /> Label direction symbol shouldn't depend on "map" vs. "line" orientation. Refer to issue <a class="issue tracker-1 status-5 priority-3 priority- closed" href="https://issues.qgis.org/issues/3643" title="wrong direction of label direction symbol (Closed)">#3643</a> for further discussion</p>
<pre><code>src/core/pal/feature.cpp | 5 +<ins>---<br /> 1 files changed, 2 insertions(</ins>), 3 deletions(-)</code></pre> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=260532011-10-22T04:21:26ZSandro Santillistrk@kbt.io
<ul></ul><p>My "dirsym" branch implements solution 2 of Mayeul (as per this ticket subject).<br />For solution 1 see bug <a class="issue tracker-1 status-5 priority-4 priority- closed" href="https://issues.qgis.org/issues/4424" title="Label orientation is limited in the left-to-right range (Closed)">#4424</a></p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=260552011-10-22T06:12:56ZSandro Santillistrk@kbt.io
<ul><li><strong>Resolution</strong> set to <i>fixed</i></li></ul><p>Fix pushed to master as r697b35a4.</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=262782011-11-08T06:23:27ZMartin Dobiaswonder.sk@gmail.com
<ul><li><strong>Resolution</strong> deleted (<del><i>fixed</i></del>)</li><li><strong>Status</strong> changed from <i>Closed</i> to <i>Open</i></li></ul><p>Reopening: the fix in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/697b35a4185df804baa0f648389a05ed8a7d59fa" title="Label direction symbol shouldn't depend on "map" vs. "line" orientation. Refer to issue #3643 for...">697b35a</a> disables the option to set the orientation of the label to be dependent on line direction.</p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=262802011-11-08T06:34:34ZSandro Santillistrk@kbt.io
<ul></ul><p>I'm not seeing that from the logs ?<br />Unless the commit log is broken:<br /><a class="external" href="https://issues.qgis.org/projects/quantum-gis/repository/revisions/697b35a4185df804baa0f648389a05ed8a7d59fa">https://issues.qgis.org/projects/quantum-gis/repository/revisions/697b35a4185df804baa0f648389a05ed8a7d59fa</a></p> QGIS Application - Bug report #3643: wrong direction of label direction symbolhttps://issues.qgis.org/issues/3643?journal_id=262832011-11-08T10:58:47ZMartin Dobiaswonder.sk@gmail.com
<ul><li><strong>Resolution</strong> set to <i>fixed</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Fixed in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/c37b63a83f9d72223f375a490c6555f0c9c2a015" title="Fix label orientation with line dependent position (#3643)">c37b63a</a>, better variable naming and added some comments</p>