Skip to content

feat: add extra property to collection and collection List #219

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sanzog03
Copy link

What I am changing

Add the ability to add extra parameters to collection and collectionList. Hence, they can be used to store metadata and extra information about the collection.

How I did it

In the current implementation of TiPg, a schema table in represents the whole collection and the rows represent items.
Since there is no separate table to store the collection data, If we add any columns with prefix "collection_properties_", we use that as extra properties.
A dependency injection is added which handles the above mentioned case.

How you can test it

First ingest data with a column prefixing with "collection_properties_". Then, using the API docs, test if it shows up in the collection and collection list endpoints.

@slesaad
Copy link

slesaad commented May 20, 2025

@vincentsarago can you please have a look at this? we're aware this isn't the best approach, but would love to hear thoughts on what that would be

@vincentsarago vincentsarago self-requested a review May 20, 2025 16:12
@vincentsarago
Copy link
Member

TBH I'm not sure to get the need of this. If it's to retrieve the list of properties you could use the /queryables endpoint.

This also break the OGC specification!

@bitner
Copy link
Contributor

bitner commented May 20, 2025

The entire goal of TiPg is to require no configuration to expose a feature service from Postgres/PostGIS tables without needing to add any additional functions/tables etc to the Postgres instance. If you require discovery of collections via metadata in the collections, I would recommend (and this is what we do at DevSeed) storing the metadata for each TiPG Collection as an Item in a Stac Catalog (ideally using PgSTAC).

@slesaad
Copy link

slesaad commented May 22, 2025

Hmm understood. We thought about that too, but having a collection in two different places felt redundant. But if that's what is recommended, we'll follow that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants