Beispiel #1
0
def do_list_cells_by_xy_multiple(config):
    cells = list_cells(x=[124, 125], y=[-25, -24], years=[2002], satellites=["LS7"],
                       dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25],
                       database=config.get_db_database(), user=config.get_db_username(),
                       password=config.get_db_password(),
                       host=config.get_db_host(), port=config.get_db_port())

    for cell in cells:
        _log.debug("Found cell xy = %s", cell.xy)
    def get_cells_from_db(self):

        from datacube.api.query import list_cells

        x_list = range(self.x_min, self.x_max + 1)
        y_list = range(self.y_min, self.y_max + 1)

        for cell in list_cells(x=x_list, y=y_list, acq_min=self.acq_min, acq_max=self.acq_max,
                               satellites=[satellite for satellite in self.satellites],
                               dataset_types=self.get_dataset_types()):
            yield cell
Beispiel #3
0
def do_list_cells_by_xy_single(config=None):
    cells = list_cells(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],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25, DatasetType.DSM],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25, DatasetType.DSM, DatasetType.DEM],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25, DatasetType.DSM, DatasetType.DEM, DatasetType.DEM_HYDROLOGICALLY_ENFORCED],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25, DatasetType.DSM, DatasetType.DEM, DatasetType.DEM_HYDROLOGICALLY_ENFORCED, DatasetType.DEM_SMOOTHED],
                       config=config)

    for cell in cells:
        _log.info("Found cell xy = %s", cell.xy)
Beispiel #4
0
def do_list_cells_by_xy_single_no_ls7_slc_off_no_ls8_pre_wrs_2(config=None):
    cells = list_cells(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],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25, DatasetType.DSM],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25, DatasetType.DSM, DatasetType.DEM],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25, DatasetType.DSM, DatasetType.DEM, DatasetType.DEM_HYDROLOGICALLY_ENFORCED],
                       # dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25, DatasetType.DSM, DatasetType.DEM, DatasetType.DEM_HYDROLOGICALLY_ENFORCED, DatasetType.DEM_SMOOTHED],
                       exclude=[LS7_SLC_OFF_EXCLUSION, LS8_PRE_WRS_2_EXCLUSION],
                       config=config)

    for cell in cells:
        _log.info("Found cell xy = %s", cell.xy)
    def get_cells_from_db(self):

        from datacube.api.query import list_cells

        x_list = range(self.x_min, self.x_max + 1)
        y_list = range(self.y_min, self.y_max + 1)

        for cell in list_cells(
                x=x_list,
                y=y_list,
                acq_min=self.acq_min,
                acq_max=self.acq_max,
                satellites=[satellite for satellite in self.satellites],
                dataset_types=self.get_dataset_types()):
            yield cell