https://issues.qgis.org/https://issues.qgis.org/favicon.ico2014-03-12T15:58:06ZQGIS Issue TrackingQGIS Application - Bug report #9772: QgsMapSettings::setDestinationCrs() does not achieve desired effecthttps://issues.qgis.org/issues/9772?journal_id=495602014-03-12T15:58:06ZJürgen Fischerjef@norbit.de
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>invalid</i></li></ul><p>Use <code>QgsMapCanvas::setDestinationCrs()</code> instead of <code>QgsMapSettings::setDestinationCrs()</code></p> QGIS Application - Bug report #9772: QgsMapSettings::setDestinationCrs() does not achieve desired effecthttps://issues.qgis.org/issues/9772?journal_id=495612014-03-12T16:40:33ZLarry Shaffer
<ul></ul><p>Jürgen Fischer wrote:</p>
<blockquote>
<p>Use <code>QgsMapCanvas::setDestinationCrs()</code> instead of <code>QgsMapSettings::setDestinationCrs()</code></p>
</blockquote>
<p>While that works, I don't think you should have to do that if you already have <code>QgsMapSettings</code>, which should be all you need to do a render (if I understand its implementation).</p>
<p>I think there should probably be <code>QMapCanvas::setMapSettings( const QgsMapSettings& settings )</code> where one can just apply built-up or manipulated <code>QgsMapSettings</code>. If not, what is the purpose of the <code>QMapCanvas::mapSettings()</code> getter then?</p>
<p>I've outlined this in a <a href="http://osgeo-org.1560.x6.nabble.com/Apply-QgsMapSettings-then-render-via-Python-td5107542.html" class="external">recent mailing list post</a>.</p>
<p>Etienne, the reason the following doesn't work, is because a copy of the canvas's <code>QgsMapSettings</code> is being returned, i.e. no direct access:</p>
<pre><code>iface.mapCanvas().mapSettings().setDestinationCrs(crs)</code></pre> QGIS Application - Bug report #9772: QgsMapSettings::setDestinationCrs() does not achieve desired effecthttps://issues.qgis.org/issues/9772?journal_id=495632014-03-12T19:05:05ZEtienne Tourigny
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>the situation is a bit confusing... the functions in deprecated class QgsMapRenderer have been replaced by equivalents in QgsMapSettings (as described by a post by Martin Dobias [1]). Why does not use the mapSettings everywhere?</p>
<p>and what is the use of QgsMapSettings::setDestinationCrs() if it has no effect? Might as well remove it...</p>
<p>there are also a few duplicate get/set functions between QgsMapCanvas and QgsMapSettings (e.g. setCrsTransformEnabled) which further add to the confusion.</p>
<p>I am going to insist on re-opening this bug because I think the API needs a bit of cleanup to remove duplicates and make it consistent.</p>
<p>[1] <a class="external" href="http://osgeo-org.1560.x6.nabble.com/QGIS-Multi-threaded-Rendering-td5093928.html">http://osgeo-org.1560.x6.nabble.com/QGIS-Multi-threaded-Rendering-td5093928.html</a></p> QGIS Application - Bug report #9772: QgsMapSettings::setDestinationCrs() does not achieve desired effecthttps://issues.qgis.org/issues/9772?journal_id=496322014-03-17T08:52:14ZEtienne Tourigny
<ul><li><strong>Assignee</strong> set to <i>Martin Dobias</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Low</i></li></ul><p>I now understand from an email by Martin [1] that QgsMapSettings should be used to query map settings, not set them.</p>
<p>It would be nice to have this documented in the QgsMapSettings or QgsCanvas documentation.</p>
<p>The documentation in QgsMapCanvas::mapSettings reads "Get access to properties used for map rendering" which could be a bit clearer, stating that it should be used for consulting only.</p>
<p>I overlooked that this member returns a const& - probably because pyqt lets you modify the returned object without complaining.</p>
<p>[1] <a class="external" href="http://comments.gmane.org/gmane.comp.gis.qgis.devel/30592">http://comments.gmane.org/gmane.comp.gis.qgis.devel/30592</a></p> QGIS Application - Bug report #9772: QgsMapSettings::setDestinationCrs() does not achieve desired effecthttps://issues.qgis.org/issues/9772?journal_id=784472017-04-30T23:08:51ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Regression?</strong> set to <i>No</i></li><li><strong>Easy fix?</strong> set to <i>No</i></li></ul> QGIS Application - Bug report #9772: QgsMapSettings::setDestinationCrs() does not achieve desired effecthttps://issues.qgis.org/issues/9772?journal_id=1024102019-03-09T15:04:52ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Resolution</strong> changed from <i>invalid</i> to <i>end of life</i></li><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li></ul><p><strong>End of life notice: QGIS 2.18 LTR</strong>
<strong><br />Source:</strong><br /><a class="external" href="http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/">http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/</a></p>