[Qgis-user] Disappearing labels and how to get them back

Cory Albrecht maps at hanfastolfe.com
Fri Jun 16 09:23:08 PDT 2023


I meant to say

> Because QGIS from 3.x has **NOT** handled JSON  or array columns well
from PostGIS layers


https://issues.qgis.org/issues/20872
https://issues.qgis.org/issues/21460
https://issues.qgis.org/issues/21542
https://issues.qgis.org/issues/22127



On Thu, Jun 15, 2023 at 10:22 PM Cory Albrecht <maps at hanfastolfe.com> wrote:

> I found the problem.
>
> Because QGIS from 3.x has handled JSON  or array columns well from PostGIS
> layers, I finally converted most of those columns to text fields. Because
> of that I had very few features lasted edited years ago which had had
> anything in the full_name::JSON column, most were NULL, so the data driven
> code
>
>
> if(
>
>   map_get("full_name", 'en') IS NULL,
>   "name",
>   map_get("full_name", 'en')[0]
> ) +
> '\nFrom: ' +
> format_date("start_date", 'yyyy-MM-dd') +
> '\nTo: ' +
> format_date("end_date", 'yyyy-MM-dd')
>
>
> did not work, as after "full_name" was converted from full_name::JSON to
> full_name::TEXT, the map() function of course no longer worked and the
> creation of the label text just errored out and produced nothing.
>
> I had only made that column change on one PostgreSQL server, not on the
> other, which was why it seems to happen on copy. The style that worked
> referenced a different column, name::TEXT, that has never changed since the
> layer was created years ago.
>
> On Thu, Jun 15, 2023 at 9:48 PM Cory Albrecht <maps at hanfastolfe.com>
> wrote:
>
>> Hello Emma,
>>
>> Thanks for taking the time to help, but unfortunately that did not work.
>> :-(
>>
>> I've attached the exported styles in case that helps you or anybody else.
>>
>>
>> On Thu, Jun 15, 2023 at 8:39 PM Emma Hain <emma at north-road.com> wrote:
>>
>>> Hi Cory
>>> This is the manual way to do it - someone may have a cooler of way of
>>> doing it.
>>>
>>>    1. In the Layer Styling panel, click on Label panel.
>>>    2. Under Placement, you will see that that the X/Y will be coloured
>>>    yellow.
>>>    3. Click on each of these and select 'Clear'
>>>    4. N.B. Other parameters may still be affected as well - they will
>>>    be coloured in yellow - just clear them as well.
>>>
>>> [image: image.png]
>>>
>>> If you need to do this for individual labels, select the features and
>>> click on the Label Properties and reset/clear out the parameters
>>> [image: image.png]
>>>
>>> I hope this helps, and keen to hear other ways.
>>>
>>> Cheers
>>> Em
>>>
>>> On Fri, 16 Jun 2023 at 05:54, Cory Albrecht via QGIS-User <
>>> qgis-user at lists.osgeo.org> wrote:
>>>
>>>> Hello,
>>>>
>>>> I was cutting and pasting between different layers and different
>>>> PostGIS servers, and the features that were cut and masted in no longer
>>>> have visible labels and I cannot get them to reappear.
>>>>
>>>> The auxiliary storage columns `auxiliary_storage_labeling_positionx`
>>>> and `…_positiony` were created a while back when I was toying with moving
>>>> labels around, but even when the layer is set to editable, those
>>>> columns were not editable. I also couldn't use the field calculator to
>>>> change them.
>>>>
>>>> How do I reset all labelling for a layer and get the missing labels
>>>> back?
>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>>
>>> --
>>> Emma Hain — Product Manager/Senior GIS Analyst
>>> emma at north-road.com / 0414 512 782
>>> [image: https://north-road.com]
>>> *North Road*
>>> Cartography • Development • Spatial Analysis
>>> ------------------------------
>>> *north-road.com* <http://north-road.com>
>>> <https://twitter.com/northroadgeo>
>>> <https://www.linkedin.com/company/north-road-studios>
>>> <https://www.facebook.com/North-Road-997236690392419/home>
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230616/ae1bd2e5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 45851 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230616/ae1bd2e5/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 2994 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230616/ae1bd2e5/attachment-0003.png>


More information about the QGIS-User mailing list