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 support for items propertyname parameter #51

Closed
tomkralidis opened this issue Jun 15, 2018 · 5 comments · Fixed by #566
Closed

add support for items propertyname parameter #51

tomkralidis opened this issue Jun 15, 2018 · 5 comments · Fixed by #566
Assignees
Labels
enhancement New feature or request

Comments

@tomkralidis
Copy link
Member

propertyname=foo,bar should return the response with just foo and bar properties.

@tomkralidis tomkralidis added the enhancement New feature or request label Jun 15, 2018
@tomkralidis tomkralidis self-assigned this Jun 15, 2018
@francbartoli
Copy link
Contributor

I'd like to have also the possibility to return only some of the properties without any geometry at all. Maybe to discuss with the spec team since in such cases the mime type would change into simple application/json

francbartoli pushed a commit that referenced this issue Nov 2, 2020
* add support for propertyname and skipGeometry parameters (#51)

* fix tests

* fix tests

* fix tests

* fix vars

* add tests
@justb4
Copy link
Member

justb4 commented Nov 2, 2020

GeoHealthCheck observes errors from the pygeoapi demo instances that use latest Docker Image from PR #565 related to this issue:

e.g. on URL: https://demo.pygeoapi.io/master/collections/utah_city_locations/items

[2020-11-02T13:17:12Z] {/usr/local/lib/python3.8/dist-packages/flask/app.py:1891} ERROR - Exception on /collections/utah_city_locations/items [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask_cors/extension.py", line 165, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/pygeoapi/pygeoapi/flask_app.py", line 213, in collection_items
    headers, status_code, content = api_.get_collection_items(
  File "/pygeoapi/pygeoapi/api.py", line 921, in get_collection_items
    content = p.query(startindex=startindex, limit=limit,
TypeError: query() got an unexpected keyword argument 'select_properties'

Is there a config adaptation needed on demo server endpoints?

@justb4
Copy link
Member

justb4 commented Nov 2, 2020

No, I think some Providers, like OGR, are missing select_properties= param on query() function.

@tomkralidis tomkralidis mentioned this issue Nov 2, 2020
@tomkralidis
Copy link
Member Author

Bug fix submitted in #566

@justb4
Copy link
Member

justb4 commented Nov 2, 2020

Yes, thanks for quick action @tomkralidis ! GHC tests positive on all demo endpoints based on master Docker Image.

pvgenuchten pushed a commit to pvgenuchten/pygeoapi that referenced this issue Jan 18, 2021
… (geopython#565)

* add support for propertyname and skipGeometry parameters (geopython#51)

* fix tests

* fix tests

* fix tests

* fix vars

* add tests
francbartoli pushed a commit to francbartoli/pygeoapi that referenced this issue Jul 8, 2021
… (geopython#565)

* add support for propertyname and skipGeometry parameters (geopython#51)

* fix tests

* fix tests

* fix tests

* fix vars

* add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants