GeoscienceAustralia / agdc

Repository for Australian Geoscience Data Cube (AGDC) code
BSD 3-Clause "New" or "Revised" License
29 stars 24 forks source link

Enhance the query API to support only including datasets based on the month of acquisition #55

Closed simonoldfield closed 9 years ago

simonoldfield commented 9 years ago

For example, so that you can specify that you want datasets from 2005 but only only if they were acquired in Jan/Feb/Mar.

simonoldfield commented 9 years ago

Implemented in 0.1.0 snapshot.

Can now specify months parameter to list_cells and list_tiles functions.

For example...

    cells = list_cells_as_list(x=[120], y=[-25],
                               acq_min=parse_date_min("2005"),    
                               acq_max=parse_date_max("2005"),
                               satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
                               dataset_types=[DatasetType.ARG25],
                               months=[Months.January, Months.February, Months.March],
                               config=config)

There are also default values for Australian seasons so you can do, for example, months=MONTHS_BY_SEASON[Season.SUMMER].