Skip to content

Instantly share code, notes, and snippets.

@robbibt
Last active October 27, 2020 03:31
Show Gist options
  • Select an option

  • Save robbibt/b73eb27bcc3801728066b45b1b407bc9 to your computer and use it in GitHub Desktop.

Select an option

Save robbibt/b73eb27bcc3801728066b45b1b407bc9 to your computer and use it in GitHub Desktop.
Ready-to-run datacube.load example
import datacube
from datacube.utils import geometry
from datacube.utils.geometry import CRS
# Connect to datacube
dc = datacube.Datacube(app='Simple example')
# Set up analysis data query
query = {
'x': (1754576.964742866, 1762576.964742866),
'y': (-3843290.4794818247, -3835290.4794818247),
'crs': 'EPSG:3577'
}
# Load data
data = dc.load(product="ga_ls8c_ard_3",
group_by="solar_day",
dask_chunks={},
output_crs='EPSG:3577',
resolution=(-30, 30),
time=('2015-01-01', '2016-01-01'),
**query)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment