-
Notifications
You must be signed in to change notification settings - Fork 179
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
Update catalog.json to new 'links' style #127
Comments
+1 for consistency across all "lists" of things. However, @metasim's question about how to model STAC as Postgres DDL (I was interpreting it as "static STAC") got me thinking about this a bit more... In order to model it, a join table would need to be introduced that contains the "key", which complicates things a bit. Remind me again why lists are no longer modeled as arrays; I missed that discussion and still don't fully buy the change. |
I believe @matthewhanson advocated for switching from arrays. I think the idea was to make it easier to reference a particular asset (originally was just assets, then links for consistency). So instead of making implementations search through the whole array to find the 'geotiff' asset, or the 'metadata' asset, they can just use the geotiff key to get exactly what they want. I think it was seen to be a relatively minor convenience win, with little downside. Though yeah, once we get in to catalog links it seems like more of a stretch. |
@francbartoli To be honest I hadn't given it that much thought... I was more interested in just bulk loading a static asset catalog into PostGIS for spatial predicate search (primarily), and filtering by metadata (secondarily). I'm not sure I understand what benefits JSONB bring, but I'm hardly knowledgable about json-in-relational-database matters. My assumption is that one would want the geometry to be in it's own column for indexing, and so the SQL writer doesn't have to dig it out of the JSON structure for spatial relations. Is the benefit to just save the work of mapping to DDL? WRT @mojodna's statement about having a join table, etc., I'd be happy with (and may end up writing for myself‡) a DBA-cringeworthy mapping that doesn't worry so much about normalization, more in the style of a big data database where you organize around a particular query pattern. Probably closer to the ElasticSearch mapping that @matthewhanson did for IMO, +1 for key/value lookups over access via array index. ‡My current thinking is to create a custom |
@metasim I'm with you about geometry indexing even though the mix with json in relation could save any effort at least to model links/assets objects. Also JSONB can be indexed for faster operations |
JSONB hadn't crossed my mind either, and will be great for modeling metadata keys that vary ( More generally, I think my objection to lists-as-objects is that it introduces application-specific "optimizations" into the core spec (in the form of facilitating lookups) while dirtying the semantics associated with those lists:
|
Decided against doing this at the sprint 3. Closing |
Update catalog.json in the examples and the schema validation to do link json in the same way we do in 0.5.0. Like do
@mojodna - I think this will need a change to STAC browser. Maybe we should make this a 0.6.0 release? Though it feels like a relatively minor change, just for the static browser, and one we should have made in 0.5.0.
I suppose we could also just keep it the same, and have the catalog links not be keyed. cc @matthewhanson
The text was updated successfully, but these errors were encountered: