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

Add 'mode' featurecount to vector REST API #517

Merged
merged 5 commits into from
Apr 4, 2023
Merged

Conversation

wlorenzetti
Copy link
Member

@wlorenzetti wlorenzetti commented Apr 4, 2023

Add new mode featurecount to vector REST API /vector/api.

Give a QGIS layer id a project id, this 'mode' returns a dict in which for each rule-key of the layer style categories the number of features identified by that style category is reported.
I.e.

For a API call like

GET /vector/api/featurecount/qdjango/321/countries_simpl_adf0132d_df8d_4fa3_a55b_65b00f790256/

it returns:

{
    "result": true,
    "data": {
        "0": 688,
        "1": 296,
        "2": 524,
        "3": 613,
        "4": 336
    },
    ...
}

style GET/POST query parameter is optional, if not sent is used layer current style.

Closes: #

@wlorenzetti wlorenzetti marked this pull request as ready for review April 4, 2023 14:19
@wlorenzetti
Copy link
Member Author

@volterra79 said me when can I merge it.

@volterra79
Copy link
Member

@volterra79 said me when can I merge it.

@wlorenzetti ok for me

@volterra79 volterra79 self-requested a review April 4, 2023 14:41
@wlorenzetti wlorenzetti merged commit 36466da into dev Apr 4, 2023
@wlorenzetti wlorenzetti deleted the feature_count_api branch April 4, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants