[Qgis-user] QGIS-User Digest, Vol 224, Issue 2

Edouard Bourgine edouard.bourgine at acosol.fr
Thu Oct 10 05:36:17 PDT 2024


Hi, 

I haven't try it but :
	Is it possible to render your layout with the street vertically and
turn a 90° the rendered part?
	Or are you able to round the angle ? Like round to the tens : 85 to
95 ° become 90 then add or remove 1° to set the side you want ? 

Best regards,

Edouard

Message: 4
Date: Wed, 2 Oct 2024 07:44:00 -0400
From: Hugh Kelley <hghklly at gmail.com>
To: qgis-user <qgis-user at lists.osgeo.org>
Subject: [Qgis-user] Vertical Line Labeling Orientation
Message-ID:
	<CAOrcXHGC3aU11F0tkzRcs84ayRCX2hs6UGG9GRRhJf9QMQVaFg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,
I'm looking for suggestions or guidance for handling some fine tuning of
line labels where semi-vertical lines are creating some challenges.

The map layout i'm using is rotated so that a main street line is always
oriented horizontally with labelled cross streets running vertically.

The issue is that when a cross street is oriented slightly towards the
upper right, the label is rendered with the bottom towards the right, so as
not to be "upside down". The same is true of streets slightly angled toward
the upper left.

This creates labels that, to the human eye, should be oriented the same
because they look vertical, 90 degrees, but are rendered "incorrectly"
opposite to each other, because mathematically they are a few degrees off
from 90 and one would need to technically be upside down.

So far I've spent some time with expressions using azimuth, main_angle and
case statements but haven't had a lot of luck changing the orientation of
the line labels.

The one thing that has worked is setting the label to match the orientation
of the (single) linestrings, ST_Reverse in postgis can then reverse the
label orientation, but this creates 2 problems. The first is that my
conversion from an st_union'ed multilistring to an st_linemerge'd single
linestring results in some broken lines and other messy geometries. The
second is that there are a few cases where the orientation of the map
requires labels to be flipped depending on which page of the atlas is being
rendered, so a dynamic label orientation setting would be much preferable
to a static one based on the orientation of the underlying geometry.

Thanks for any and all suggestions, feeling like I have run out of things
to try. It may be time to pass this off to the illustrator folks for manual
clean up but I do try to fix these things programmatically as much as
possible.

best,

Hugh
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.osgeo.org/pipermail/qgis-user/attachments/20241002/4b1f3a87/at
tachment-0001.htm>

------------------------------

Subject: Digest Footer

_______________________________________________
QGIS-User mailing list
QGIS-User at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


------------------------------

End of QGIS-User Digest, Vol 224, Issue 2
*****************************************



More information about the QGIS-User mailing list