.. _ref__create_new_jobs: Create new jobs --------------- There are multiple ways to create new jobs depending on what you have. The section below gives a brief overview. .. note:: * Only those datasets that were correctly added to the local GeoMultiSens data storage before can be used to create a new GeoMultiSens preprocessing job (see :ref:`ref__add_new_data_to_the_database`). * You need to set the parameter `virtual_sensor_id` when creating a new processing job to define which target sensor is used for spatial and and spectral homogenization. Here is an overview of pre-defined target sensors: .. csv-table:: :header: "virtual_sensor_id", "target sensor description" :widths: 4, 10 1, Landsat-8 10, Sentinel-2A 10m 11, Sentinel-2A 20m 12, Sentinel-2A 60m 19, Landsat-5 20, Landsat-7 21, Sentinel-2A spectral bands at Landsat pixel grid Create a job from a list of filenames ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The list of filenames refers to the filenames of the previously downloaded provider archive data (see :meth:`gms_preprocessing.misc.database_tools.GMS_JOB.from_filenames` for details). .. code-block:: python from gms_preprocessing.options.config import get_conn_database from gms_preprocessing.misc.database_tools import GMS_JOB job = GMS_JOB(conn_db=get_conn_database('localhost')) job.from_filenames( list_filenames=['LE07_L1TP_045032_20081026_20160918_01_T1.tar.gz', 'LE07_L1TP_045032_20081010_20160918_01_T1.tar.gz'], virtual_sensor_id=1, comment='Two exemplary Landsat-7 scenes for application XY.') # write the job into the GeoMultiSens metadata database job.create() .. code-block:: bash OUT: New job created successfully. job-ID: 26193017 The job contains: - 2 Landsat-7 ETM+_SLC_OFF scenes Create a job from a list of entity IDs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - TODO (see :meth:`gms_preprocessing.misc.database_tools.GMS_JOB.from_entityIDlist` for details) Create a job from a list of scene IDs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you have a list of GeoMultiSens scene IDs, you can also create a new processing job for them (see :meth:`gms_preprocessing.misc.database_tools.GMS_JOB.from_sceneIDlist` for details): .. code-block:: python from gms_preprocessing.options.config import get_conn_database from gms_preprocessing.misc.database_tools import GMS_JOB job = GMS_JOB(conn_db=get_conn_database('localhost')) job.from_sceneIDlist(list_sceneIDs=[9390928,], virtual_sensor_id=1 comment='Example job for only one scene with the ID 9390928.') # write the job into the GeoMultiSens metadata database job.create() .. code-block:: bash OUT: New job created successfully. job-ID: 26193458 The job contains: - 1 Landsat-5 TM scene Create a job from a dictionary ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - TODO (see :meth:`gms_preprocessing.misc.database_tools.GMS_JOB.from_dictlist` for details)