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

Tables with multiple geometries - Items response #26

Open
KoalaGeo opened this issue Nov 2, 2022 · 1 comment
Open

Tables with multiple geometries - Items response #26

KoalaGeo opened this issue Nov 2, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@KoalaGeo
Copy link
Collaborator

KoalaGeo commented Nov 2, 2022

Description

I am currently getting the following error message: Internal Server Error - The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. when I want to access a specific item of a given collection which is displayed correctly.

Here is the associated log.

It's something in the api code that parses our results through to the response for a single item. The fix will be to add a section to their json function to handle geoalchemy objects.

@KoalaGeo KoalaGeo added the bug Something isn't working label Nov 2, 2022
@KoalaGeo
Copy link
Collaborator Author

KoalaGeo commented Nov 3, 2022

Table has two geometries!!

"Yes,
There are indeed several geometries:

"location": "USER-DEFINED"
"viewshed_simple": "USER-DEFINED"
"viewshed_precise": "USER-DEFINED"
"footprint": "USER-DEFINED"
as well as several 2 fields.
"geotags_json" "json"
"iiif_data" "json"
The field"geotags_array" is of "ARRAY" type.

[Yesterday 13:10] John Stevenson - BGS
ix is to modify the output so that it returns something sensible for extra geometries, probably GeoJSON text. We could do that in the provider. This is how we do it for a main geometry column: https://github.com/geopython/pygeoapi/blob/db8fae61eb63532ae308fe80ec1f816f0e96c815/pygeoapi/provider/postgresql.py#L320.

[Yesterday 13:44] John Stevenson - BGS
It should just be a few lines to fix, just looping over the columns and converting any that are GeoAlchemy geometries to JSON.

@KoalaGeo KoalaGeo changed the title Swiss Issue - Items response Tables with multiple geometries - Items response Nov 3, 2022
@KoalaGeo KoalaGeo mentioned this issue May 9, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant