[QGIS-Developer] Processing: sort algorithm not working?

Arnaud Morvan arnaud.morvan at camptocamp.com
Mon Nov 23 08:58:58 PST 2020


Hi Andreas.

Note that the order of features in attributes table does not seems to 
reflect the source order.

After sorting your dataset with sortbyexpression, try to add a 
auto-incremental field and open this new output in attribute table.

Sort this attribute table by the new auto-incremental field. If the 
order is good, it is not a sortbyexpression issue, but an attribute 
table issue.

Regards

Arnaud Morvan
Ingénieur logiciel
Tél: +33 (0)4 58 48 20 32

Camptocamp France SAS
18 rue du Lac Saint André
Savoie Technolac - Bâtiment Le Dauphin
F-73370 Le Bourget du Lac
http://www.camptocamp.com

Le 21/11/2020 à 17:23, Bernd Vogelgesang a écrit :
>
> Hi Andreas,
>
> have a look at my last years issue on this
>
> https://github.com/qgis/QGIS/issues/29794
>
> maybe it's the same
>
> Cheers,
>
> Bernd
>
> On 19.11.20 14:16, Andreas Neumann wrote:
>> Hi,
>>
>> I have a model where at the very end before adding it to the project I was
>> trying to sort the result with an expression.
>>
>> But: the sorting doesn't work. In the help there is the cryptic hint at
>> https://docs.qgis.org/3.10/de/docs/user_manual/processing_algs/qgis/vectorgeneral.html#qgisorderbyexpression
>> that "Be careful, it might not work as expected with some providers, the
>> order might not be kept every time."
>>
>> Does someone know more about it? Which providers specifically do not
>> support sorting?
>>
>> Does this statement apply to the reading provider or the writing provider?
>>
>> In my case, I never got any correct sorting ...
>>
>> Thanks,
>> Andreas
>>
>> --
>> Andreas Neumann
>> QGIS.ORG board member (treasurer)
>>
>>
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20201123/8ab10c50/attachment.html>


More information about the QGIS-Developer mailing list