DOV-Vlaanderen / pydov

Python package to retrieve data from Databank Ondergrond Vlaanderen (DOV)
https://pydov.readthedocs.io/en/latest/
MIT License
31 stars 19 forks source link

Search query attributes #68

Closed pjhaest closed 5 years ago

pjhaest commented 6 years ago

@Roel you mentioned earlier that the search query can make use of the attributes defined in the wfs schema. Ok so far. With the 'DOV-verkenner' there are more options available to search for. Are these also available for pydov? If so, could you post an attribute table to the docs?

Roel commented 6 years ago

No, these are not available. These use the internal (non-documented) REST services and search directly on the database.

If you miss specific search attributes, we can look into adding them the to the WFS services so they become available in pydov too.

pjhaest commented 6 years ago

In that case, the 'Diepte aquifer code' attribute for the 'hydrogeologische stratigrafie' would be nice to have. I guess it is the largest code for one interpretation?

Roel commented 6 years ago

If I understand it correctly, this operation searches on a combination of aquifer and depth of a single layer of the interpretation.

Since this is a many to one attribute (one interpretation has multiple layers), this is not something I can add in the WFS, where we have a single record per interpretation.

What I can try to do is add some aggregate attributes per interpretation (type) that would allow some coarse search operations. In the case of 'hydrogeologische stratigrafie' I could for example add the maximum depth and a commaseparated list of aquifer codes. This would allow querying for hydrogeologic interpretations that contain a specific aquifer, although not linked to its depth.

Would this be a useful addition?

pjhaest commented 6 years ago

+1

Roel commented 6 years ago

I'll add some new aggregated attributes to the corresponding output dataframes in the documentation and make a PR with the proposal before implementing them on the service side.

Due to holidays this will be something for July, at the earliest.

Roel commented 6 years ago

I will add the maximum depth for all interpretation types for now.

Roel commented 5 years ago

I have added this as the diepte_tot_m attribute for all interpretation types. It is now possible to use this as a search attribute to query interpretations. No code changes are needed.

pjhaest commented 5 years ago

Ok, nice, I will add it to the Notebook examples

stijnvanhoey commented 5 years ago

Fixed by #134, thanks a lot!