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

Ingest should look at JSON type field for Collection/Item determination rather than field heuristic #486

Closed
philvarner opened this issue May 5, 2023 · 0 comments
Assignees

Comments

@philvarner
Copy link
Collaborator

Ingest currently determines if an input JSON is a Collection or an Item based on a heuristic of it it has an extent or a geometry:

  if (data && data.hasOwnProperty('extent')) {
    index = COLLECTIONS_INDEX
  } else if (data && data.hasOwnProperty('geometry')) {
    index = data.collection
  } else {
    return null
  }

However, STAC API 1.0.0 requires the field type for both Item and Collection. This should be used for this determination instead.

jwalgran added a commit that referenced this issue May 8, 2023
The `type` field is required in STAC API 1.0.0 and using that field is
preferable to a heuristic based on other field values.

Connects #486
jwalgran added a commit that referenced this issue May 8, 2023
The `type` field is required in STAC API 1.0.0 and using that field is
preferable to a heuristic based on other field values.

Connects #486
@jwalgran jwalgran self-assigned this May 8, 2023
jwalgran added a commit that referenced this issue May 8, 2023
The `type` field is required in STAC API 1.0.0 and using that field is
preferable to a heuristic based on other field values.

Connects #486
jwalgran added a commit that referenced this issue May 8, 2023
The `type` field is required in STAC API 1.0.0 and using that field is
preferable to a heuristic based on other field values.

Connects #486
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

No branches or pull requests

2 participants