<div dir="ltr"><div>Hi Tom, <br></div><div><br></div><div>I don't have a great solution for you but I'm following with some interest as I routinely struggle with fine tuning labels . <br></div><div><br></div><div>A couple things I can offer: <br></div><div><br></div><div>this feature request for the ability to lock labels once they're generated [0]. There are a number of issues, mostly closed, complaining about unexpected label movement that are consistent with what you're talking about. <br></div><div><br></div><div>overall, reading the github content, I don't think there's currently a solution because the labeling engine is not quite deterministic. I don't imagine that's a small fix. I think in ESRI world, the way they handle this is by allowing the user to convert labels to an image overlaid on the map, which has its own set of major disadvantages. <br></div><div><br></div><div>For what it's worth, there are two labelling engines in QGIS currently. You may have better luck with one or the other. I have switched entirely to the newer engine but it may be less consistent so you might try switching. You can switch in the settings label properties' automated placement settings. (Yellow gear icon in the image below)<br></div><div><br></div><div>In terms of "hacky" fixes for your problem. Could it be helpful to have a version of the outputs without labels at all, check the diff for those and then review the labeled exports as necessary based on the non-labelled diff? All it would take would be a common naming convention. Git picks up a change in "no-labeled_export_4.png" which means you check "labled_export_4.png" for problems. I think that would reduce false positives caused by moving labels. Not a super elegant solution obviously.<br></div><div><br></div><div>best of luck, maybe this email will bring the thread back to the top of someone's inbox on a friday morning when they're in the mood to work on something that's not work. (as is the case for me currently.) <br></div><div><br></div><div><br></div><div>[0] <a href="https://github.com/qgis/QGIS/issues/28386">https://github.com/qgis/QGIS/issues/28386</a></div><div><br></div><div><img src="cid:ii_kw6hxdjv0" alt="image.png" width="139" height="190"><br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 18, 2021 at 3:24 PM Tom Christian <<a href="mailto:thomaschristian@gmail.com">thomaschristian@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'd like to know if there's anything I can change (e.g. a well-buried advanced setting or environment variable) to remove pseudo-randomness within QGIS's label positioning.<div><br></div><div>I have a QGIS project version-controlled within Git and a process to export layout PNGs from the base (before) commit and the head (after) commit when a change is made. These images are compared and any variation flagged to a reviewer so that they can verify each change is intended and expected before merging to the main (release) branch.</div><div><br></div><div>I have line label positioning configured as "Preferred Placement Hint" rather than "Strict" positioning as the result is significantly better when I allow QGIS to make placement decisions on my behalf. However, in this configuration there is some pseudo-randomness where QGIS sometimes makes minor changes to label positions even though neither the data, the layout, nor the export configuration have changed. This leads to false-positives during change analysis.</div><div><br></div><div>Here is a GIF showing 5 sequential exports in which two line labels move slightly. Each of the 5 frames shows for 0.5 seconds: <a href="https://www.dropbox.com/s/x3y4vfr20s9inqw/print-map-label-movements.gif?dl=0" target="_blank">https://www.dropbox.com/s/x3y4vfr20s9inqw/print-map-label-movements.gif?dl=0</a>. One change is at "West Connector" near the centre of the image and the other is at "The Dip" near the centre of the inset map.</div><div><br></div><div>I previously posted this question on gis.stackexchange but so far no traction, so any input would be very much appreciated (<a href="https://gis.stackexchange.com/questions/416430/qgis-inconsistent-label-positions-in-png-pdf-layout-exports" target="_blank">https://gis.stackexchange.com/questions/416430/qgis-inconsistent-label-positions-in-png-pdf-layout-exports</a>).</div><div><br></div><div>Thanks</div></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Hugh Kelley       <br><div><br></div></div></div></div></div></div></div></div>