Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS Server GetFeatureInfo request should take attribute sort order into account #48742

Open
cxcandid opened this issue May 25, 2022 · 9 comments
Labels
Feature Request Server Related to QGIS server

Comments

@cxcandid
Copy link

Feature description

QGIS Server 3.24.2-1 (Windows): GetFeatureInfo request takes over the column aliases but not the configured attribute sort order.

Additional context

No response

@elpaso
Copy link
Contributor

elpaso commented May 25, 2022

I'm not sure I understand, can you please add some details?

@elpaso elpaso added the Server Related to QGIS server label May 25, 2022
@cxcandid
Copy link
Author

In QGIS we can configure an expression for attribute table sorting, but this sort order is not recognized by QGIS Server in a GetFeatureInfo request.
sort_attribute_table
sort_order

Or maybe you could implement another GetFeatureInfo paramter for sorting by attribute?

@tudorbarascu
Copy link
Member

@cxcandid Maybe this is interresting for you #41031

I honestly don't understand your request: how the sort order for attribute table should affect the GetFeatureInfo response. All the best

@tudorbarascu
Copy link
Member

@gioman I think this should have the feedback label or be closed.

@cxcandid
Copy link
Author

@tudorbarascu my feature request concerns the sorting of the features in a GetFeatureInfo request and not the sorting/reordering of the attributes/fields.

@nboisteault
Copy link

Maybe the attribute place is not the right place to configure the sort order for features in GetFeatureInfo response but AFAIK there is no way to configure it in QGIS or via a parameter in the request.

It seems GetFeatureInfo request is missing a SORTBY parameter as WFS GetFeature has.

Anyone can confirm?

@cxcandid
Copy link
Author

cxcandid commented Dec 7, 2023

@nboisteault The attribute table column configuration affects the visibility and order of the attributes, so why not use the sort order of the table as the default sort order for the GetFeatureInfo query?

@elpaso
Copy link
Contributor

elpaso commented Dec 7, 2023

Maybe the attribute place is not the right place to configure the sort order for features in GetFeatureInfo response but AFAIK there is no way to configure it in QGIS or via a parameter in the request.

It seems GetFeatureInfo request is missing a SORTBY parameter as WFS GetFeature has.

Anyone can confirm?

I can confirm, there is no way to order the results. I would add that there is not a simple way we can add this functionality: the request can query multiple layers and we should specify the ordering criteria for all of them independently.

WFS and OAPIF on the contrary can filter and order results, because they operate on a single layer for each request.

Perhaps we could add a sort by option for each layer in the server configuration panel, I am not convinced that the attribute table is the right place for this configuration: the attribute table is oriented to the desktop data visualization.

@nboisteault
Copy link

We can use w/ WFS GetFeature, several TYPENAME and several FILTERs for example: https://docs.qgis.org/3.28/fr/docs/server_manual/services/wfs.html#filter

For a GetFeatureInfo request, would it be possible to have several LAYERS and several SORTBY separated by commas ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Server Related to QGIS server
Projects
None yet
Development

No branches or pull requests

4 participants