{"_id":"597a120e70fc9c003827519f","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"},"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"},"user":"55fae9d4825d5f19001fa379","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-07-27T16:17:18.493Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"## Table of Contents\n\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/b1181e1-SF_Final_1B_Animations.gif\",\n        \"SF_Final_1B_Animations.gif\",\n        609,\n        800,\n        \"#233e3f\"\n      ],\n      \"caption\": \"This 5 second animation shows the two unprocessed 1B multispectral images in geotiff format\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7db9ad5-AOP_Animation.gif\",\n        \"AOP_Animation.gif\",\n        565,\n        909,\n        \"#203023\"\n      ],\n      \"caption\": \"Intermediate: These are the same two images after running the Advanced Image Preprocessor. These will be used as inputs for the Change Detection Preparation task\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/8571709-SF_Final_cd_prep_Animations.gif\",\n        \"SF_Final_cd_prep_Animations.gif\",\n        526,\n        678,\n        \"#192811\"\n      ],\n      \"caption\": \"After: This 5 second animation shows the 2 output files from the Change Detection Preparation task called pre_image_cdprep.tif and post_image_cdprep.tif\"\n    }\n  ]\n}\n[/block]\n\n## <a name=\"Quickstart\"></a>Quickstart Tutorial\n\n\nExample Script: Run in a python environment (i.e. - IPython) using the gbdxtools interface.\n\nThese basic settings will run Change Detection Image Pair Alignment (cdprep) from a pair of input orthorectified, AComped image output from the Advanced Image Preprocessor. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Run The Change Detection Preparation Task on a pair of images\\nfrom gbdxtools import Interface\\ngbdx = Interface()\\n\\n# The data input and lines must be edited to point to an authorized customer S3 location)\\ncd_prep = gbdx.Task('cd_prep',\\n                    pre_image_dir='s3://gbd-customer-data/CustomerAccount#/PathToPreImage/',\\n                    post_image_dir='s3://gbd-customer-data/CustomerAccount#/PathToPostImage')\\n\\nworkflow = gbdx.Workflow([cd_prep])\\n#Edit the following line(s) to reflect specific folder(s) for the output file (example location provided)\\nworkflow.savedata(cd_prep.outputs.final_pre_image_dir, location='CDPrep/pre_image_dir')\\nworkflow.savedata(cd_prep.outputs.final_post_image_dir, location='CDPrep/post_image_dir')\\nworkflow.execute()\\n\\nprint workflow.id\\nprint workflow.status\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\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    In [3]: cd_prep = gbdx.Task('cd_prep',\\n                                 pre_image_dir='s3://gbd-customer-data/7d8cfdb6-13ee-4a2a-bf7e-0aff4795d927/jkoenig/cd_prep_test/Borneo/test2/AOP/pre/',\\n                                 post_image_dir = 's3://gbd-customer-data/7d8cfdb6-13ee-4a2a-bf7e-0aff4795d927/jkoenig/cd_prep_test/Borneo/test2/AOP/post/')\\n    In [4]: workflow = gbdx.Workflow([cd_prep])\\n    In [5]: workflow.savedata(cd_prep.outputs.final_pre_image_dir, location='cd_prep_test/pub_test/pre_image_dir')\\n    In [6]: workflow.savedata(cd_prep.outputs.final_post_image_dir, location='cd_prep_test/pub_test/post_image_dir')\\n    In [7]: workflow.execute()\\n    Out [7]:\\n    u'4498407427801810318'\\n    In [8]: print workflow.status\\n    {u'state': u'running', u'event': u'started'} [9]:\\n\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n## <a name=\"Task Runtime\"></a>Task Runtime\nThere is no benchmark runtime data for this task. Standard benchmarks are sensor-specific, and this task can take images from multiple sensors.\n\n## <a name=\"Input Options\"></a>Input Options\n\nThis task takes as input two orthorectified, atmospherically compensated images in geotiff format.\nIt is intended to work as a following task to the AOP_Strip_Processor, with only the AComp option specified.\n\nExample overlapping 1B images that can be processed by Advanced Image Preprocessor prior Change Detection Preparation are:\n\n    pre-image: 10504100003E9200\n    post-image: 103001001C423600\n\n**Description of Basic Input Parameters for the Change Detection Preparation GBDX task**\n\nThe following table lists the cd_prep GBDX inputs.\nAll inputs are optional with default values, with the exception of\n'pre_image_dir', 'post_image_dir', 'final_pre_image_dir', and 'final_post_image_dir'\nwhich specify the task's input and output data locations.\n\nName        | Required             |       Default         |        Valid Values             |   Description\n------------|-------------|:---------------------:|---------------------------------|-----------------\npre_image_dir   | Yes     |  N/A  |  S3 URL | Pre-image input directory containing one or more TIFF files\npost_image_dir   |  Yes     | N/A  |  S3 URL | Post-image input directory containing one or more TIFF files\n\n\n## <a name=\"Outputs\"></a>Outputs\n\nOn completion, the processed imagery will be written to your specified S3 Customer \nLocation (i.e., s3://gbd-customer-data/unique customer id/pre_image_dir/, s3://gbd-customer-data/unique customer id/post_image_dir/).\nEach output directory will contain a single geotif file with one of the names: pre_image_cdprep.tif or post_image_cdprep.tif.\n\n\nName        | Required             |       Default         |        Valid Values             |   Description\n------------|-------------|:---------------------:|---------------------------------|-----------------\nfinal_pre_image_dir |  Yes    |N/A | S3 URL | Pre-image output directory for cd_prep\nfinal_post_image_dir | Yes     |N/A | S3 URL | Post-image output directory for cd_prep\n\n## <a name=\"Advanced Options\"></a>Advanced Options\n\nThe options in the following table provide additional control over the resulting output.  All of the directories are generally\nfor diagnostic purposes.\n\nName                     |       Default         |        Valid Values             |   Description\n-------------------------|:---------------------:|---------------------------------|-----------------\nbuffer_in_meters   |   1500.0  |  string | Amount in meters by which to buffer the intersection polygon of the initial crop\nresampling_method   |   near  |  string | Method for resampling the images to a common grid.  Choices are 'near', 'bilinear', 'cubic', 'cubicspline', 'lanczos', 'average' \nresolution_in_meters   |   2.0  |  string | The resolution in meters of the pair of output images\nenable_cloud_mask   |   true |  string | Enable/disable cloud mask. Choices are 'true' or 'false'\nshrink_buffer_in_meters   |   0.0  |  string | Distance in meters by which to shrink the final intersection polygon for final crop\ncrop_pre_image_dir | N/A | S3 URL | Pre-image output directory for the cropping task (for diagnostic purposes)\ncrop_post_image_dir | N/A | S3 URL | Post-image output directory for the cropping task (for diagnostic purposes)\ncrop_work_dir | N/A | S3 URL | Working output directory for the initial cropping task (for diagnostic purposes)\ncrop_log_dir | N/A | S3 URL | Log output directory for the initial cropping task (for diagnostic purposes)\nimage2image_dir | N/A | S3 URL | Log output directory for the image2image task (for diagnostic purposes)\n\n#### Advanced Script\n\nThis script runs the Advanced Image Preprocessor and Change Detection Image Pair Alignment end to end.  Note that you must write the output from the Advanced Image Preprocessor to a file which the Change Detection Preparation task will read.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Quickstart Example running the task name.\\n\\n# Initialize the Environment.\\nfrom gbdxtools import Interface\\ngbdx = Interface()\\n\\ntasks = []\\noutput_location = 'Digital_Globe/Change_Detection/task'\\n\\n# Change Detection task setup\\ncd_prep_task = gbdx.Task('cd_prep')\\n\\n# Pre-Image Auto ordering task parameters\\npre_order = gbdx.Task(\\\"Auto_Ordering\\\")\\npre_order.inputs.cat_id = '10504100003E9200'\\npre_order.impersonation_allowed = True\\npre_order.persist = True\\npre_order.timeout = 36000\\ntasks += [pre_order]\\n\\n# Pre-Image AOP task parameters\\npre_aop = gbdx.Task(\\\"AOP_Strip_Processor\\\")\\npre_aop.inputs.data = pre_order.outputs.s3_location.value\\npre_aop.inputs.bands = 'MS'\\npre_aop.inputs.enable_pansharpen = False\\npre_aop.inputs.enable_dra = False\\npre_aop.inputs.ortho_epsg = \\\"UTM\\\"\\npre_aop.timeout = 36000\\ntasks += [pre_aop]\\n\\n# Post-Image Auto ordering task parameters\\npost_order = gbdx.Task(\\\"Auto_Ordering\\\")\\npost_order.inputs.cat_id = '103001001C423600'\\npost_order.impersonation_allowed = True\\npost_order.persist = True\\npost_order.timeout = 36000\\ntasks += [post_order]\\n\\n# Post-Image AOP task parameters\\npost_aop = gbdx.Task(\\\"AOP_Strip_Processor\\\")\\npost_aop.inputs.data = post_order.outputs.s3_location.value\\npost_aop.inputs.bands = 'MS'\\npost_aop.inputs.enable_pansharpen = False\\npost_aop.inputs.enable_dra = False\\npost_aop.inputs.ortho_epsg = \\\"UTM\\\"\\npost_aop.timeout = 36000\\ntasks += [post_aop]\\n\\n# Add Change Detection task parameters\\ncd_prep_task.inputs.pre_image_dir = pre_aop.outputs.data.value\\ncd_prep_task.inputs.post_image_dir = post_aop.outputs.data.value\\ntasks += [cd_prep_task]\\n\\n# Set up workflow save data\\nworkflow = gbdx.Workflow(tasks)\\nworkflow.savedata(cd_prep_task.outputs.final_pre_image_dir, location=output_location + \\\"/pre\\\")\\nworkflow.savedata(cd_prep_task.outputs.final_post_image_dir, location=output_location + \\\"/post\\\")\\n\\n# Execute workflow\\nworkflow.execute()\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n\n\n\n##<a name=\"Known Issues\"></a>Known Issues\n* The Change Detection Preparation task only processes multispectal images (MS) and UTM projrcted images. Make sure the [Advanced Image Preprocessor](doc:advanced-image-preprocessor) step is set to bands=\"MS\" and ortho_epsg=\"UTM\" (most common reasons for failure).\n* The output from the Advanced Image Preprocessor must be written to a directory for use by this task.  You cannot use \"aop.outputs.data.value\" as input.\n* You should also be aware of the following:\n    * See issues for [Pairwise Image Registration](doc:pairwise-image-registration) : fails if not enough tie points (<20).\n    * The Cloud and Shadow Mask applied here sometimes confuses water and shadow.\n\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":"The Change Detection Image Pair Alignment task performs a series of operations on a pair of input images to prepare them for the application of downstream change detection algorithms. It accomplishes this via the following operations:\n\n1. Initial crop of the input images to their region of overlap  \n2. Image-to-image registration\n3. Alignment of the images to a common grid, cloud removal and final cropping.\n\nThe input imagery for this task is two multispectral orthorectified, atmospherically compensated images in geotiff format and UTM projection typically output from the [Advanced Image Preprocessor](doc:advanced-image-preprocessor) \n\t\n**GBDX Registered Name**: cd_prep\n**Provider**: GBDX\n**Inputs**: tiff or vrt output from the [Advanced Image Preprocessor](doc:advanced-image-preprocessor) \n**Outputs**: Tiff file with the image name format:  pre_image_cdprep.tif and post_image_cdprep.tif.\n**Compatible bands & sensors**: WorldView-2, WorldView-3, GeoEye-1, QuickBird. Change Detection Preparation can process images with different numbers of bands. The output files will have the same number of bands as the input files.","slug":"change-detection-imagepairalignment","type":"basic","title":"Change Detection Image Pair Alignment"}

Change Detection Image Pair Alignment

The Change Detection Image Pair Alignment task performs a series of operations on a pair of input images to prepare them for the application of downstream change detection algorithms. It accomplishes this via the following operations: 1. Initial crop of the input images to their region of overlap 2. Image-to-image registration 3. Alignment of the images to a common grid, cloud removal and final cropping. The input imagery for this task is two multispectral orthorectified, atmospherically compensated images in geotiff format and UTM projection typically output from the [Advanced Image Preprocessor](doc:advanced-image-preprocessor) **GBDX Registered Name**: cd_prep **Provider**: GBDX **Inputs**: tiff or vrt output from the [Advanced Image Preprocessor](doc:advanced-image-preprocessor) **Outputs**: Tiff file with the image name format: pre_image_cdprep.tif and post_image_cdprep.tif. **Compatible bands & sensors**: WorldView-2, WorldView-3, GeoEye-1, QuickBird. Change Detection Preparation can process images with different numbers of bands. The output files will have the same number of bands as the input files.

## 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/b1181e1-SF_Final_1B_Animations.gif", "SF_Final_1B_Animations.gif", 609, 800, "#233e3f" ], "caption": "This 5 second animation shows the two unprocessed 1B multispectral images in geotiff format" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/7db9ad5-AOP_Animation.gif", "AOP_Animation.gif", 565, 909, "#203023" ], "caption": "Intermediate: These are the same two images after running the Advanced Image Preprocessor. These will be used as inputs for the Change Detection Preparation task" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/8571709-SF_Final_cd_prep_Animations.gif", "SF_Final_cd_prep_Animations.gif", 526, 678, "#192811" ], "caption": "After: This 5 second animation shows the 2 output files from the Change Detection Preparation task called pre_image_cdprep.tif and post_image_cdprep.tif" } ] } [/block] ## <a name="Quickstart"></a>Quickstart Tutorial Example Script: Run in a python environment (i.e. - IPython) using the gbdxtools interface. These basic settings will run Change Detection Image Pair Alignment (cdprep) from a pair of input orthorectified, AComped image output from the Advanced Image Preprocessor. [block:code] { "codes": [ { "code": "# Run The Change Detection Preparation Task on a pair of images\nfrom gbdxtools import Interface\ngbdx = Interface()\n\n# The data input and lines must be edited to point to an authorized customer S3 location)\ncd_prep = gbdx.Task('cd_prep',\n pre_image_dir='s3://gbd-customer-data/CustomerAccount#/PathToPreImage/',\n post_image_dir='s3://gbd-customer-data/CustomerAccount#/PathToPostImage')\n\nworkflow = gbdx.Workflow([cd_prep])\n#Edit the following line(s) to reflect specific folder(s) for the output file (example location provided)\nworkflow.savedata(cd_prep.outputs.final_pre_image_dir, location='CDPrep/pre_image_dir')\nworkflow.savedata(cd_prep.outputs.final_post_image_dir, location='CDPrep/post_image_dir')\nworkflow.execute()\n\nprint workflow.id\nprint 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 In [3]: cd_prep = gbdx.Task('cd_prep',\n pre_image_dir='s3://gbd-customer-data/7d8cfdb6-13ee-4a2a-bf7e-0aff4795d927/jkoenig/cd_prep_test/Borneo/test2/AOP/pre/',\n post_image_dir = 's3://gbd-customer-data/7d8cfdb6-13ee-4a2a-bf7e-0aff4795d927/jkoenig/cd_prep_test/Borneo/test2/AOP/post/')\n In [4]: workflow = gbdx.Workflow([cd_prep])\n In [5]: workflow.savedata(cd_prep.outputs.final_pre_image_dir, location='cd_prep_test/pub_test/pre_image_dir')\n In [6]: workflow.savedata(cd_prep.outputs.final_post_image_dir, location='cd_prep_test/pub_test/post_image_dir')\n In [7]: workflow.execute()\n Out [7]:\n u'4498407427801810318'\n In [8]: print workflow.status\n {u'state': u'running', u'event': u'started'} [9]:\n", "language": "python" } ] } [/block] ## <a name="Task Runtime"></a>Task Runtime There is no benchmark runtime data for this task. Standard benchmarks are sensor-specific, and this task can take images from multiple sensors. ## <a name="Input Options"></a>Input Options This task takes as input two orthorectified, atmospherically compensated images in geotiff format. It is intended to work as a following task to the AOP_Strip_Processor, with only the AComp option specified. Example overlapping 1B images that can be processed by Advanced Image Preprocessor prior Change Detection Preparation are: pre-image: 10504100003E9200 post-image: 103001001C423600 **Description of Basic Input Parameters for the Change Detection Preparation GBDX task** The following table lists the cd_prep GBDX inputs. All inputs are optional with default values, with the exception of 'pre_image_dir', 'post_image_dir', 'final_pre_image_dir', and 'final_post_image_dir' which specify the task's input and output data locations. Name | Required | Default | Valid Values | Description ------------|-------------|:---------------------:|---------------------------------|----------------- pre_image_dir | Yes | N/A | S3 URL | Pre-image input directory containing one or more TIFF files post_image_dir | Yes | N/A | S3 URL | Post-image input directory containing one or more TIFF files ## <a name="Outputs"></a>Outputs On completion, the processed imagery will be written to your specified S3 Customer Location (i.e., s3://gbd-customer-data/unique customer id/pre_image_dir/, s3://gbd-customer-data/unique customer id/post_image_dir/). Each output directory will contain a single geotif file with one of the names: pre_image_cdprep.tif or post_image_cdprep.tif. Name | Required | Default | Valid Values | Description ------------|-------------|:---------------------:|---------------------------------|----------------- final_pre_image_dir | Yes |N/A | S3 URL | Pre-image output directory for cd_prep final_post_image_dir | Yes |N/A | S3 URL | Post-image output directory for cd_prep ## <a name="Advanced Options"></a>Advanced Options The options in the following table provide additional control over the resulting output. All of the directories are generally for diagnostic purposes. Name | Default | Valid Values | Description -------------------------|:---------------------:|---------------------------------|----------------- buffer_in_meters | 1500.0 | string | Amount in meters by which to buffer the intersection polygon of the initial crop resampling_method | near | string | Method for resampling the images to a common grid. Choices are 'near', 'bilinear', 'cubic', 'cubicspline', 'lanczos', 'average' resolution_in_meters | 2.0 | string | The resolution in meters of the pair of output images enable_cloud_mask | true | string | Enable/disable cloud mask. Choices are 'true' or 'false' shrink_buffer_in_meters | 0.0 | string | Distance in meters by which to shrink the final intersection polygon for final crop crop_pre_image_dir | N/A | S3 URL | Pre-image output directory for the cropping task (for diagnostic purposes) crop_post_image_dir | N/A | S3 URL | Post-image output directory for the cropping task (for diagnostic purposes) crop_work_dir | N/A | S3 URL | Working output directory for the initial cropping task (for diagnostic purposes) crop_log_dir | N/A | S3 URL | Log output directory for the initial cropping task (for diagnostic purposes) image2image_dir | N/A | S3 URL | Log output directory for the image2image task (for diagnostic purposes) #### Advanced Script This script runs the Advanced Image Preprocessor and Change Detection Image Pair Alignment end to end. Note that you must write the output from the Advanced Image Preprocessor to a file which the Change Detection Preparation task will read. [block:code] { "codes": [ { "code": "# Quickstart Example running the task name.\n\n# Initialize the Environment.\nfrom gbdxtools import Interface\ngbdx = Interface()\n\ntasks = []\noutput_location = 'Digital_Globe/Change_Detection/task'\n\n# Change Detection task setup\ncd_prep_task = gbdx.Task('cd_prep')\n\n# Pre-Image Auto ordering task parameters\npre_order = gbdx.Task(\"Auto_Ordering\")\npre_order.inputs.cat_id = '10504100003E9200'\npre_order.impersonation_allowed = True\npre_order.persist = True\npre_order.timeout = 36000\ntasks += [pre_order]\n\n# Pre-Image AOP task parameters\npre_aop = gbdx.Task(\"AOP_Strip_Processor\")\npre_aop.inputs.data = pre_order.outputs.s3_location.value\npre_aop.inputs.bands = 'MS'\npre_aop.inputs.enable_pansharpen = False\npre_aop.inputs.enable_dra = False\npre_aop.inputs.ortho_epsg = \"UTM\"\npre_aop.timeout = 36000\ntasks += [pre_aop]\n\n# Post-Image Auto ordering task parameters\npost_order = gbdx.Task(\"Auto_Ordering\")\npost_order.inputs.cat_id = '103001001C423600'\npost_order.impersonation_allowed = True\npost_order.persist = True\npost_order.timeout = 36000\ntasks += [post_order]\n\n# Post-Image AOP task parameters\npost_aop = gbdx.Task(\"AOP_Strip_Processor\")\npost_aop.inputs.data = post_order.outputs.s3_location.value\npost_aop.inputs.bands = 'MS'\npost_aop.inputs.enable_pansharpen = False\npost_aop.inputs.enable_dra = False\npost_aop.inputs.ortho_epsg = \"UTM\"\npost_aop.timeout = 36000\ntasks += [post_aop]\n\n# Add Change Detection task parameters\ncd_prep_task.inputs.pre_image_dir = pre_aop.outputs.data.value\ncd_prep_task.inputs.post_image_dir = post_aop.outputs.data.value\ntasks += [cd_prep_task]\n\n# Set up workflow save data\nworkflow = gbdx.Workflow(tasks)\nworkflow.savedata(cd_prep_task.outputs.final_pre_image_dir, location=output_location + \"/pre\")\nworkflow.savedata(cd_prep_task.outputs.final_post_image_dir, location=output_location + \"/post\")\n\n# Execute workflow\nworkflow.execute()", "language": "python" } ] } [/block] ##<a name="Known Issues"></a>Known Issues * The Change Detection Preparation task only processes multispectal images (MS) and UTM projrcted images. Make sure the [Advanced Image Preprocessor](doc:advanced-image-preprocessor) step is set to bands="MS" and ortho_epsg="UTM" (most common reasons for failure). * The output from the Advanced Image Preprocessor must be written to a directory for use by this task. You cannot use "aop.outputs.data.value" as input. * You should also be aware of the following: * See issues for [Pairwise Image Registration](doc:pairwise-image-registration) : fails if not enough tie points (<20). * The Cloud and Shadow Mask applied here sometimes confuses water and shadow. #### Contact Us If you have any questions or issues with this task, please contact [**gbdx-support@digitalglobe.com** ](mailto:gbdx-support@digitalglobe.com).