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

Add Spatial/Temporal Support in API #463

Open
CarsonDavis opened this issue Apr 12, 2023 · 0 comments
Open

Add Spatial/Temporal Support in API #463

CarsonDavis opened this issue Apr 12, 2023 · 0 comments

Comments

@CarsonDavis
Copy link
Collaborator

CarsonDavis commented Apr 12, 2023

note: still adding details

Overview

The API is currently only using the default text-based mechanisms to search date and spatial fields. We want to add a standard compliment of spatial/temporal searches.

Desired Searches

Spatial Search

Parameters

  • bounding box
  • fully_contained
    • true: returns results that lie fully inside of the given bounding box (default?
    • false: returns results that overlap in any way with the given bounding box

Considerations

  • Do we want to consider arbitrary polygon searches instead of bounding boxes?

Relevant Models

Natively Capable

Deployments have a spatial_bounds field and can be directly searched.

Inferred

Other models will need to have their search inferred through the linkage to a Deployment object.

  • Campaign
  • IOP
  • SignificantEvents
  • DOI

Validation

API should validate incoming requests and send back instructive messages for invalid requests.

  • incorrect date format
  • start_date after end_date

Date Searches

Parameters

  • start_date
  • end_date
  • fully_contained: boolean
    • true: returns items who's dates are fully contained within given range (default?)
    • false: returns items who's dates overlap with given range

Considerations

  • May want to consider an easy way for users to input common searches such as, 'all dates after 2016', perhaps by leaving the end date blank

Relavant Models

Natively Date Capable Models

Some models have a start_date and end_date field, and can be directly searched. Implementing search for these models is the minimum acceptance criteria.

  • Campaign
  • Deployment
  • IOP
  • SignificantEvent

Inferred Date Models

Some models do not have their own date fields, but relevant dates can be inferred through their parent linkage to a date capable model. Such inferred models which we might want to add a helper function to infer and allow search are:

  • DOI (through campaign or deployment linkage)
  • Instrument (through DOI linkage)
  • Platform (through DOI linkage)

Validation

API should validate incoming requests and send back instructive messages for invalid requests.

  • invalid bounding box format (not a number, etc)
  • invalid bounding box (doesn't form a convex shape)
@edkeeble edkeeble removed their assignment Jun 12, 2023
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