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

Datacube-ows-serve CLI tool #588

Open
whatnick opened this issue May 5, 2021 · 2 comments
Open

Datacube-ows-serve CLI tool #588

whatnick opened this issue May 5, 2021 · 2 comments
Assignees

Comments

@whatnick
Copy link
Member

whatnick commented May 5, 2021

datacube-ows version: master
ows_config.py version/link:: dynamic

Description

Wanted to preview some freshly produced products in an S3 bucket 🪣 via QGIS.

What I Did

Downloaded the data or used VSIS3 + a VRT to open it in QGIS and poke around.

What I would like to do

Have an OWS CLI tool called datacube-ows-serve which makes this a one-liner.

The CLI tool accepts the following parameters:

  • Blob store prefix for S3/Azure/GCP/Filesystem
  • Metadata YAML file or URL
  • Product YAML file or URL

It performs the following steps:

  • Bootstraps a Datacube with the given product and metadata using sqlite. ( Perhaps this should be 2 tools)
  • Indexes the data from storage into this embedded Datacube DB
  • Creates a smart set of default OWS styles and saves it to a JSON file for future tweaking
  • Fires up an embedded flask server to run an instance of OWS to serve the COGs from that location

Inspired by User Story from Erin Telfer.

@whatnick whatnick self-assigned this May 5, 2021
@SpacemanPaul
Copy link
Contributor

SpacemanPaul commented May 6, 2021

Cool idea, but I'm immediately struck by a few technical issues.

  1. Seems to me that a large portion of this functionality doesn't really belong in OWS. Looks like it straddles the areas-of-responsibilities of multiple projects, including core, odc-tools and ows. It should probably be a part of new odc repo (odc-integration? odc-orchestration?) that depends on odc-tools and ows. OWS currently has no formal dependency on odc-tools and as currently spec'd this proposal would create a lot of clutter in the ows repo.
  2. Will ODC core even work with a sqlite database? Does it have no dependencies on postgres-only SQL features? Even if core is OK, OWS definitely won't work off sqlite - no materialised views or postgis. Probably makes more sense to use the proposed new STAC interface Alex raised at yesterday's Steering Council meeting, and bypass the db entirely.
  3. "Creates a smart set of default OWS styles" That's a really tall ask. A simple, dumb set of default OWS styles is a lot more realistic. :) There's also a fair bit more to OWS configuration than just styles, which would need to be dealt with.
  4. All seems a bit Rube Goldberg. Surely there's a simpler way to meet this use case?

@andrewdhicks
Copy link
Contributor

Could easier generation of a VRT be the answer instead? Have the tool produce the VRT, then it is just a matter of opening the file/URL in QGIS, and using QGIS's built in styles to view the data? Otherwise if it the data already in a datacube, then explorer could produce the VRT on the fly.

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

No branches or pull requests

3 participants