{"_id":"57d2d9abe99bd32b006a5640","project":"55faeacad0e22017005b8265","version":{"_id":"55faeacad0e22017005b8268","project":"55faeacad0e22017005b8265","__v":35,"createdAt":"2015-09-17T16:31:06.800Z","releaseDate":"2015-09-17T16:31:06.800Z","categories":["55faeacbd0e22017005b8269","55faf550764f50210095078e","55faf5b5626c341700fd9e96","55faf8a7825d5f19001fa386","560052f91503430d007cc88f","560054f73aa0520d00da0b1a","56005aaf6932a00d00ba7c62","56005c273aa0520d00da0b3f","5601ae7681a9670d006d164d","5601ae926811d00d00ceb487","5601aeb064866b1900f4768d","5601aee850ee460d0002224c","5601afa02499c119000faf19","5601afd381a9670d006d1652","561d4c78281aec0d00eb27b6","561d588d8ca8b90d00210219","563a5f934cc3621900ac278c","5665c5763889610d0008a29e","566710a36819320d000c2e93","56ddf6df8a5ae10e008e3926","56e1c96b2506700e00de6e83","56e1ccc4e416450e00b9e48c","56e1ccdfe63f910e00e59870","56e1cd10bc46be0e002af26a","56e1cd21e416450e00b9e48e","56e3139a51857d0e008e77be","573b4f62ef164e2900a2b881","57c9d1335fd8ca0e006308ed","57e2bd9d1e7b7220000d7fa5","57f2b992ac30911900c7c2b6","58adb5c275df0f1b001ed59b","58c81b5c6dc7140f003c3c46","595412446ed4d9001b3e7b37","59e76ce41938310028037295","5a009de510890d001c2aabfe"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"v1","version_clean":"1.0.0","version":"1"},"parentDoc":null,"user":"55fae9d4825d5f19001fa379","__v":1,"category":{"_id":"573b4f62ef164e2900a2b881","__v":0,"project":"55faeacad0e22017005b8265","version":"55faeacad0e22017005b8268","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-17T17:05:38.443Z","from_sync":false,"order":8,"slug":"algorithm-guide","title":"Algorithms"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-09T15:47:55.424Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"## Table of Contents\n\nSection | Description\n--- | ---\n[Imagery Examples](#Imagery Examples) | Before and after examples\n[Quickstart](#Quickstart) | Get started with a Python-based quickstart tutorial\n[Task Runtime](#Task Runtime) | Benchmark runtimes for the algorithm\n[Input Options](#Input Options) | Required and optional task inputs\n[Outputs](#Outputs) | Task outputs and example contents\n[Advanced Options](#Advanced Options) | Additional information for advanced users\n[Known Issues](#Known Issues) | Issues users should be aware of\n\n\n## <a name=\"Imagery Examples\"></a>Imagery Examples\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/37b819d-Beijing_NoACompF.JPG\",\n        \"Beijing_NoACompF.JPG\",\n        800,\n        320,\n        \"#5b656d\"\n      ],\n      \"caption\": \"Before: Image before AComp processing - Naples, Italy\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/36a47f0-Beijing_ACompedF.JPG\",\n        \"Beijing_ACompedF.JPG\",\n        800,\n        320,\n        \"#485c3a\"\n      ],\n      \"caption\": \"After: The same image after AComp processing\"\n    }\n  ]\n}\n[/block]\n\n## <a name=\"Quickstart\"></a>Quickstart Tutorial\n\nThe AComp GBDX task can be run through a simple Python script using  <a href=\"http://gbdxtools.readthedocs.io/en/latest/#\" target=\"_blank\"> gbdxtools</a>, which requires some initial setup.  \n\n**Example Script:** These basic settings will run AComp on a Landsat 8 image.  See also examples listed under the [Advanced Options](#Advanced Options).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Run Atmospheric Compensation (AComp) on Landsat-8 data\\n    from gbdxtools import Interface\\n    gbdx = Interface()\\n\\n    # The data input and lines must be edited to point to an authorized customer S3 location)\\n    acomp = gbdx.Task('AComp', data='s3://gbd-customer-data/CustomerAccount#/PathToImage/')\\n    workflow = gbdx.Workflow([acomp])\\n    # Edit the following line(s) to reflect specific folder(s) for the output file (example location provided)\\n    workflow.savedata(acomp.outputs.data, location='S3 gbd-customer-data location/<customer account>/output directory')\\n    workflow.execute()\\n\\n    print workflow.id\\n    print workflow.status\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n   \n     \n**Example Run in IPython:**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"   In [1]: from gbdxtools import Interface\\n    In [2]: gbdx = Interface()\\n    2016-06-06 10:53:09,026 - gbdxtools - INFO - Logger initialized\\n    In [3]: acomp = gbdx.Task('AComp', data='s3://landsat-pds/<Landsat8 Image ID>')\\n    In [4]: workflow = gbdx.Workflow([acomp])\\n    In [5]: workflow.savedata(acomp.outputs.data, location='S3 gbd-customer-data location/<customer account>/output directory')\\n    In [6]: workflow.execute()\\n    Out[6]: u'4349739083145886153'\\n    In [7]: print workflow.id\\n    4349739083145886153\\n    In [8]: print workflow.status\\n    2016-06-06 10:53:41,301 - gbdxtools - DEBUG - Get status of workflow: 4349739083145886153\\n    {u'state': u'pending', u'event': u'submitted'}\\n    In [9]:\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n   \n\n## <a name=\"Task Runtime\"></a>Task Runtime\nThese are the average runtimes for this algorithm. All benchmark tests were run using a standard set of images, based on our most common customer scenarios. Runtime benchmarks apply to the specific algorithm, and don’t represent the runtime of a complete workflow.\n\n  Sensor Name  |  Total Pixels  |  Total Area (k2)  |  Time(secs)  |  Time/Area k2\n--------|:----------:|-----------|----------------|---------------\nWV02|35,872,942|329.87| 591.909 | 1.79 \nWV03|35,371,971|196.27| 390.332 | 1.99 \nGE01| 57,498,000|332.97| 507.664 | 1.52 \nQB02 | 41,551,668 | 312.07 | 395.610  | 1.27  \n\n## <a name=\"Input Options\"></a>Input Options\n\nTo use this task, set the \"data\" input parameter (described below) to point at an S3 bucket containing the image data to process. Note, that this task will search through the given bucket to locate the input data and process the data it finds. In order to process VNIR or VNIR + PAN data, simply point the \"data\" input parameter at the directory within the bucket containing the VNIR or VNIR + PAN data for a single catalog ID.\n\nIf SWIR data is to also be processed, the workflow is slightly different. A summary follows here, but refer to [Advanced Options](#advanced-options) for examples. Since SWIR data is normally ordered separately from VNIR in GBDX and therefore has a different catalog ID, in order to process VNIR+SWIR or VNIR+PAN+SWIR, it is necessary to point the \"data\" input parameter at a parent directory containing both a single VNIR (or VNIR+PAN) catalog ID directory and also a single corresponding SWIR catalog ID directory. Note that the SWIR data must intersect the VNIR data and be \"acquired during the same overpass\" in order to obtain valid results. SWIR data acquired during the same overpass will have a catalog ID that is differentiated from the VNIR catalog ID solely by having an \"A\" in the 4th position of the catalog ID. For example, the SWIR catalog ID 104A010008437000 was acquired during the same overpass as the the VNIR catalog ID 1040010008437000.  Please [Contact Us](#contact-us) if you would like us to stage a VNIR+SWIR test dataset for you.\n\n**Description of Input Parameters and Options for the AComp GBDX task**\n\nThe following table lists the AComp-GBDX inputs. All inputs are optional with default values, with the exception of 'data' which specifies the task's input data location and output data location.\n\nName                     |       Default         |        Valid Values             |   Description\n-------------------------|:---------------------:|---------------------------------|-----------------\ndata (in)      |   N/A   | S3 URL                                | S3 location of input data.\ndata (out)     |   N/A   | S3 URL                                | S3 gbd-customer-data location\nexclude_bands  |   Off\t |  'P', 'MS1', 'Multi', 'All-S'         | Comma-separated list of bands to exclude; excluded bands are not processed.\nbit_depth      |   16    |  11, 16 or 32                         | Bit depth refers to how many digits the spectral information for each pixel is stored in\n\n\n\n**Script Example specifying exclusion of panchromatic bands**\n\n\tacomp = gbdx.Task('AComp', exclude_bands='P')\n\n**Script Example specifying alternate bit depth**\n\n\tacomp = gbdx.Task('AComp', data=data, bit_depth=32 )\n\n## <a name=\"Outputs\"></a>Outputs\nOn completion, the processed imagery will be written to your specified S3 Customer Location (e.g.  s3://gbd-customer-data/unique customer id/named directory/).   The AComp output files will be located Within the 'named directory'. The specific layout and names of the output files will depend on the specific input files and the options selected.\n\n**Description of Output Files**\n\nData Input Type          | Description of Output Files  | Runs FastOrtho to produce Final Output\n-------------------------|:------------------------------|------------------------------\nLandsat-8                | .TIF                          |  NO   (individual .tif files)\nDG Sensors Level 1B      | .TIF, .IMD                    |  YES  (single mosaic .tif)\nDG Sensors Level 2 and Level 3 |  .TIF, .TIL, .IMD       |  NO   (individual .tif files)\n\n\n\n## <a name=\"Advanced Options\"></a>Advanced Options\n\n#### Run AComp end to end with an ENVI Task\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Run AComp end to end with an ENVI Task: Example using ISODATA Classification\\n\\tfrom gbdxtools import Interface\\n\\tgbdx = Interface()\\n\\n\\t# Run AComp \\n\\t# Edit the following line(s) to reflect specific folder(s) for the input file.\\n\\tacomptask = gbdx.Task('AComp', exclude_bands='P', data='s3://gbd-customer-data/CustomerAccount#/PathToImage/')\\n\\n\\t# Run ENVI ISODATA Classification on the AComp output\\n\\tisodata = gbdx.Task(\\\"ENVI_ISODATAClassification\\\")\\n\\n\\t# Run the workflow and save the data\\n\\tworkflow = gbdx.Workflow([acomptask, isodata])\\n\\tisodata.inputs.input_raster = acomptask.outputs.data.value\\n\\t# Edit the following line(s) to reflect specific folder(s) for the output file.\\n\\tworkflow.savedata(acomptask.outputs.data, location='/CustomerAccount#/PathToOutputDirectory/')\\n\\tworkflow.savedata(isodata.outputs.output_raster_uri, location='/CustomerAccount#/PathToOutputDirectory/')\\n\\t\\n\\tworkflow.execute()\\n\\tprint workflow.id\\n\\tprint workflow.status\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n\t\n## <a name=\"Known Issues\"></a>Known Issues\n\nInput imagery must at least contain the VNIR multispectral bands, and optionally may also include panchromatic data and/or SWIR data.  Therefore, AComp cannot be run on WorldView-1 imagery, or on panchromatic or SWIR  bands in the absence of multispectral data.\n\n## Contact Us   \nIf you have any questions or issues with this task, please contact [**gbdx-support:::at:::digitalglobe.com** ](mailto:gbdx-support@digitalglobe.com).","excerpt":"This pre-processing task performs atmospheric compensation on satellite imagery to improve quality for spectral analysis. AComp  converts the image digital numbers to surface reflectance to remove variation due to illumination, viewing geometries, and atmospheric effects. \n\t\n**GBDX Registered Name**: AComp\n**Provider**: DigitalGlobe (DG)\n**Inputs**: DG imagery, Level 1B; Landsat 8 imagery\n**Outputs**: See the  Outputs section for outputs by sensor platform\n**Compatible bands & sensors**: Landsat 8 imagery. Multispectral imagery from the following DG Sensors: WorldView-3, WorldView-2, GeoEye-1, and QuickBird. For PAN and SWIR see \"known issues.\"\n\n**Note**: Note: Orthorectification is automatically applied to DigitalGlobe Level 1B imagery with an output coordinate system of Geographic WGS84 (EPSG:4326). If you want to execute AComp and control the output coordinate system for the orthorectification process, please refer to the Advanced Image Preprocessor algorithm.\"","slug":"acomp","type":"basic","title":"AComp (Atmospheric Compensation)"}

AComp (Atmospheric Compensation)

This pre-processing task performs atmospheric compensation on satellite imagery to improve quality for spectral analysis. AComp converts the image digital numbers to surface reflectance to remove variation due to illumination, viewing geometries, and atmospheric effects. **GBDX Registered Name**: AComp **Provider**: DigitalGlobe (DG) **Inputs**: DG imagery, Level 1B; Landsat 8 imagery **Outputs**: See the Outputs section for outputs by sensor platform **Compatible bands & sensors**: Landsat 8 imagery. Multispectral imagery from the following DG Sensors: WorldView-3, WorldView-2, GeoEye-1, and QuickBird. For PAN and SWIR see "known issues." **Note**: Note: Orthorectification is automatically applied to DigitalGlobe Level 1B imagery with an output coordinate system of Geographic WGS84 (EPSG:4326). If you want to execute AComp and control the output coordinate system for the orthorectification process, please refer to the Advanced Image Preprocessor algorithm."

## Table of Contents Section | Description --- | --- [Imagery Examples](#Imagery Examples) | Before and after examples [Quickstart](#Quickstart) | Get started with a Python-based quickstart tutorial [Task Runtime](#Task Runtime) | Benchmark runtimes for the algorithm [Input Options](#Input Options) | Required and optional task inputs [Outputs](#Outputs) | Task outputs and example contents [Advanced Options](#Advanced Options) | Additional information for advanced users [Known Issues](#Known Issues) | Issues users should be aware of ## <a name="Imagery Examples"></a>Imagery Examples [block:image] { "images": [ { "image": [ "https://files.readme.io/37b819d-Beijing_NoACompF.JPG", "Beijing_NoACompF.JPG", 800, 320, "#5b656d" ], "caption": "Before: Image before AComp processing - Naples, Italy" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/36a47f0-Beijing_ACompedF.JPG", "Beijing_ACompedF.JPG", 800, 320, "#485c3a" ], "caption": "After: The same image after AComp processing" } ] } [/block] ## <a name="Quickstart"></a>Quickstart Tutorial The AComp GBDX task can be run through a simple Python script using <a href="http://gbdxtools.readthedocs.io/en/latest/#" target="_blank"> gbdxtools</a>, which requires some initial setup. **Example Script:** These basic settings will run AComp on a Landsat 8 image. See also examples listed under the [Advanced Options](#Advanced Options). [block:code] { "codes": [ { "code": "# Run Atmospheric Compensation (AComp) on Landsat-8 data\n from gbdxtools import Interface\n gbdx = Interface()\n\n # The data input and lines must be edited to point to an authorized customer S3 location)\n acomp = gbdx.Task('AComp', data='s3://gbd-customer-data/CustomerAccount#/PathToImage/')\n workflow = gbdx.Workflow([acomp])\n # Edit the following line(s) to reflect specific folder(s) for the output file (example location provided)\n workflow.savedata(acomp.outputs.data, location='S3 gbd-customer-data location/<customer account>/output directory')\n workflow.execute()\n\n print workflow.id\n print workflow.status", "language": "python" } ] } [/block] **Example Run in IPython:** [block:code] { "codes": [ { "code": " In [1]: from gbdxtools import Interface\n In [2]: gbdx = Interface()\n 2016-06-06 10:53:09,026 - gbdxtools - INFO - Logger initialized\n In [3]: acomp = gbdx.Task('AComp', data='s3://landsat-pds/<Landsat8 Image ID>')\n In [4]: workflow = gbdx.Workflow([acomp])\n In [5]: workflow.savedata(acomp.outputs.data, location='S3 gbd-customer-data location/<customer account>/output directory')\n In [6]: workflow.execute()\n Out[6]: u'4349739083145886153'\n In [7]: print workflow.id\n 4349739083145886153\n In [8]: print workflow.status\n 2016-06-06 10:53:41,301 - gbdxtools - DEBUG - Get status of workflow: 4349739083145886153\n {u'state': u'pending', u'event': u'submitted'}\n In [9]:", "language": "python" } ] } [/block] ## <a name="Task Runtime"></a>Task Runtime These are the average runtimes for this algorithm. All benchmark tests were run using a standard set of images, based on our most common customer scenarios. Runtime benchmarks apply to the specific algorithm, and don’t represent the runtime of a complete workflow. Sensor Name | Total Pixels | Total Area (k2) | Time(secs) | Time/Area k2 --------|:----------:|-----------|----------------|--------------- WV02|35,872,942|329.87| 591.909 | 1.79 WV03|35,371,971|196.27| 390.332 | 1.99 GE01| 57,498,000|332.97| 507.664 | 1.52 QB02 | 41,551,668 | 312.07 | 395.610 | 1.27 ## <a name="Input Options"></a>Input Options To use this task, set the "data" input parameter (described below) to point at an S3 bucket containing the image data to process. Note, that this task will search through the given bucket to locate the input data and process the data it finds. In order to process VNIR or VNIR + PAN data, simply point the "data" input parameter at the directory within the bucket containing the VNIR or VNIR + PAN data for a single catalog ID. If SWIR data is to also be processed, the workflow is slightly different. A summary follows here, but refer to [Advanced Options](#advanced-options) for examples. Since SWIR data is normally ordered separately from VNIR in GBDX and therefore has a different catalog ID, in order to process VNIR+SWIR or VNIR+PAN+SWIR, it is necessary to point the "data" input parameter at a parent directory containing both a single VNIR (or VNIR+PAN) catalog ID directory and also a single corresponding SWIR catalog ID directory. Note that the SWIR data must intersect the VNIR data and be "acquired during the same overpass" in order to obtain valid results. SWIR data acquired during the same overpass will have a catalog ID that is differentiated from the VNIR catalog ID solely by having an "A" in the 4th position of the catalog ID. For example, the SWIR catalog ID 104A010008437000 was acquired during the same overpass as the the VNIR catalog ID 1040010008437000. Please [Contact Us](#contact-us) if you would like us to stage a VNIR+SWIR test dataset for you. **Description of Input Parameters and Options for the AComp GBDX task** The following table lists the AComp-GBDX inputs. All inputs are optional with default values, with the exception of 'data' which specifies the task's input data location and output data location. Name | Default | Valid Values | Description -------------------------|:---------------------:|---------------------------------|----------------- data (in) | N/A | S3 URL | S3 location of input data. data (out) | N/A | S3 URL | S3 gbd-customer-data location exclude_bands | Off | 'P', 'MS1', 'Multi', 'All-S' | Comma-separated list of bands to exclude; excluded bands are not processed. bit_depth | 16 | 11, 16 or 32 | Bit depth refers to how many digits the spectral information for each pixel is stored in **Script Example specifying exclusion of panchromatic bands** acomp = gbdx.Task('AComp', exclude_bands='P') **Script Example specifying alternate bit depth** acomp = gbdx.Task('AComp', data=data, bit_depth=32 ) ## <a name="Outputs"></a>Outputs On completion, the processed imagery will be written to your specified S3 Customer Location (e.g. s3://gbd-customer-data/unique customer id/named directory/). The AComp output files will be located Within the 'named directory'. The specific layout and names of the output files will depend on the specific input files and the options selected. **Description of Output Files** Data Input Type | Description of Output Files | Runs FastOrtho to produce Final Output -------------------------|:------------------------------|------------------------------ Landsat-8 | .TIF | NO (individual .tif files) DG Sensors Level 1B | .TIF, .IMD | YES (single mosaic .tif) DG Sensors Level 2 and Level 3 | .TIF, .TIL, .IMD | NO (individual .tif files) ## <a name="Advanced Options"></a>Advanced Options #### Run AComp end to end with an ENVI Task [block:code] { "codes": [ { "code": "# Run AComp end to end with an ENVI Task: Example using ISODATA Classification\n\tfrom gbdxtools import Interface\n\tgbdx = Interface()\n\n\t# Run AComp \n\t# Edit the following line(s) to reflect specific folder(s) for the input file.\n\tacomptask = gbdx.Task('AComp', exclude_bands='P', data='s3://gbd-customer-data/CustomerAccount#/PathToImage/')\n\n\t# Run ENVI ISODATA Classification on the AComp output\n\tisodata = gbdx.Task(\"ENVI_ISODATAClassification\")\n\n\t# Run the workflow and save the data\n\tworkflow = gbdx.Workflow([acomptask, isodata])\n\tisodata.inputs.input_raster = acomptask.outputs.data.value\n\t# Edit the following line(s) to reflect specific folder(s) for the output file.\n\tworkflow.savedata(acomptask.outputs.data, location='/CustomerAccount#/PathToOutputDirectory/')\n\tworkflow.savedata(isodata.outputs.output_raster_uri, location='/CustomerAccount#/PathToOutputDirectory/')\n\t\n\tworkflow.execute()\n\tprint workflow.id\n\tprint workflow.status", "language": "python" } ] } [/block] ## <a name="Known Issues"></a>Known Issues Input imagery must at least contain the VNIR multispectral bands, and optionally may also include panchromatic data and/or SWIR data. Therefore, AComp cannot be run on WorldView-1 imagery, or on panchromatic or SWIR bands in the absence of multispectral data. ## Contact Us If you have any questions or issues with this task, please contact [**gbdx-support@digitalglobe.com** ](mailto:gbdx-support@digitalglobe.com).