Ejemplo n.º 1
0
def do_list_cells_missing_by_xy_single_csv(config=None):

    filename = os.path.expandvars("$HOME/tmp/cube/cells_missing.csv")

    list_cells_missing_to_file(x=range(110, 155+1), y=range(-45, -10+1),
                               acq_min=parse_date_min("1980"), acq_max=parse_date_max("2020"),
                               satellites=[Satellite.LS7],
                               # dataset_types=[DatasetType.FC25],
                               # dataset_types=[DatasetType.PQ25],
                               # dataset_types=[DatasetType.FC25, DatasetType.PQ25],
                               dataset_types=[DatasetType.FC25, DatasetType.PQ25, DatasetType.DSM],
                               # 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],
                               filename=filename,
                               config=config)

    cells = []

    with open(filename, "rb") as f:
        reader = csv.DictReader(f)
        for record in reader:
            _log.debug("Found CSV record [%s]", record)
            cells.append(Cell.from_csv_record(record))

    for cell in cells:
        _log.debug("Found cell xy = %s", cell.xy)
Ejemplo n.º 2
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)
Ejemplo n.º 3
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)
Ejemplo n.º 4
0
def do_list_cells_missing_by_xy_single(config=None):
    cells = list_cells_missing(x=range(110, 155+1), y=range(-45, -10+1),
                               acq_min=parse_date_min("1980"), acq_max=parse_date_max("2020"),
                               satellites=[Satellite.LS7],
                               # dataset_types=[DatasetType.FC25],
                               # dataset_types=[DatasetType.PQ25],
                               # dataset_types=[DatasetType.FC25, DatasetType.PQ25],
                               dataset_types=[DatasetType.FC25, DatasetType.PQ25, DatasetType.DSM],
                               # 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.debug("Found cell xy = %s", cell.xy)
Ejemplo n.º 5
0
def do_list_cells_by_xy_single_csv(config=None):

    filename = os.path.expandvars("$HOME/tmp/cube/cells.csv")

    list_cells_to_file(x=[123], y=[-25], acq_min=parse_date_min("2014-01"), acq_max=parse_date_max("2014-01"),
                       satellites=[Satellite.LS7],
                       dataset_types=[DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25],
                       filename=filename,
                       config=config)

    cells = []

    with open(filename, "rb") as f:
        reader = csv.DictReader(f)
        for record in reader:
            _log.debug("Found CSV record [%s]", record)
            cells.append(Cell.from_csv_record(record))

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