{"_id":"5a944c83e6e53200638aa63c","project":"55faeacad0e22017005b8265","version":{"_id":"55faeacad0e22017005b8268","project":"55faeacad0e22017005b8265","__v":36,"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","5a96f89c89442e002041144b"],"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":9,"slug":"algorithm-guide","title":"Algorithms"},"user":"5a904b636bddb90012a75607","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-02-26T18:05:55.794Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":26,"body":"### Imagery Examples\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/916b834-envi_class_before_web.jpg\",\n        \"envi_class_before_web.jpg\",\n        566,\n        400,\n        \"#6a655e\"\n      ],\n      \"caption\": \"Before: Two WorldWiew 2 images taken at different times\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/bdf980d-envi_class_after_web.jpg\",\n        \"envi_class_after_web.jpg\",\n        565,\n        400,\n        \"#43b842\"\n      ],\n      \"caption\": \"After: After a change detection classification based on the above two images\"\n    }\n  ]\n}\n[/block]\n### Quickstart\nThis is a workflow example for basic processing.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Quickstart Example running the task name.\\n\\n# Initialize the Environment.\\nfrom os.path import join, split\\nfrom gbdxtools import Interface\\ngbdx = Interface()\\n\\ntasks = []\\noutput_location = 'ENVI/ChangeThresholdClassification'\\n\\n# Change Detection task setup\\npre_cat_id = '103001001EC17D00'\\npost_cat_id = '103001001C423600'\\n\\n# Pre-Image Auto ordering task parameters\\npre_order = gbdx.Task(\\\"Auto_Ordering\\\")\\npre_order.inputs.cat_id = pre_cat_id\\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_dra = False\\npre_aop.outputs.data.persist = True\\npre_aop.outputs.data.persist_location = output_location+'/pre_aop'\\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 = post_cat_id\\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_dra = False\\npost_aop.outputs.data.persist = True\\npost_aop.outputs.data.persist_location = output_location+'/post_aop'\\npost_aop.timeout = 36000\\ntasks += [post_aop]\\n\\n# Create an NDVI Product from the first image\\nenvi_ndvi1 = gbdx.Task(\\\"ENVI_SpectralIndex\\\")\\nenvi_ndvi1.inputs.input_raster = pre_aop.outputs.data.value\\nenvi_ndvi1.inputs.index = \\\"Normalized Difference Vegetation Index\\\"\\ntasks += [envi_ndvi1]\\n\\n# Create an NDVI Product from the second image\\nenvi_ndvi2 = gbdx.Task(\\\"ENVI_SpectralIndex\\\")\\nenvi_ndvi2.inputs.input_raster = post_aop.outputs.data.value\\nenvi_ndvi2.inputs.index = \\\"Normalized Difference Vegetation Index\\\"\\ntasks += [envi_ndvi2]\\n\\n# Find where the images intersect\\nenvi_II = gbdx.Task(\\\"ENVI_ImageIntersection\\\")\\nenvi_II.inputs.input_raster1 = envi_ndvi1.outputs.output_raster_uri.value\\nenvi_II.inputs.input_raster2 = envi_ndvi2.outputs.output_raster_uri.value\\ntasks += [envi_II]\\n\\n# Calculate a difference image\\nenvi_IBD = gbdx.Task(\\\"ENVI_ImageBandDifference\\\")\\nenvi_IBD.inputs.input_raster1 = envi_II.outputs.output_raster1_uri.value\\nenvi_IBD.inputs.input_raster2 = envi_II.outputs.output_raster2_uri.value\\ntasks += [envi_IBD]\\n\\n# Change Threshold Classification setup\\nenvi_CTC = gbdx.Task(\\\"ENVI_ChangeThresholdClassification\\\")\\nenvi_CTC.inputs.increase_threshold = \\\"0.1\\\"\\nenvi_CTC.inputs.decrease_threshold = \\\"0.5\\\"\\nenvi_CTC.inputs.input_raster = envi_IBD.outputs.output_raster_uri.value\\ntasks += [envi_CTC]\\n\\nworkflow = gbdx.Workflow(tasks)\\nworkflow.savedata(\\n    envi_CTC.outputs.output_raster_uri, location=output_location\\n)\\n\\nworkflow.execute()\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n\n### Inputs\nThe following table lists all ENVI_ChangeThresholdClassification inputs.\nMandatory (optional) settings are listed as Required = True (Required = False).\n\n  Name  |  Required  |  Default  |  Valid Values  |  Description  \n--------|:----------:|-----------|----------------|---------------\nfile_types|False|N/A|string|GBDX Option. Comma seperated list of permitted file type extensions. Use this to filter input files -- Value Type: STRING`[*]`\ninput_raster|True|N/A|[See ENVIRASTER input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-enviraster)|Specify a raster on which to threshold. -- Value Type: ENVIRASTER\ninput_raster_format|False|N/A|[See ENVIRASTER input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-enviraster)|Provide the format of the image, for example: landsat-8. -- Value Type: STRING\ninput_raster_band_grouping|False|N/A|[See ENVIRASTER input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-enviraster)|Provide the name of the band grouping to be used in the task, ie - panchromatic. -- Value Type: STRING\ninput_raster_filename|False|N/A|[See ENVIRASTER input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-enviraster)|Provide the explicit relative raster filename that ENVI will open. This overrides any file lookup in the task runner. -- Value Type: STRING\nincrease_threshold|False|N/A|string|Specify the increase threshold to show areas of increase. -- Value Type: DOUBLE\ndecrease_threshold|False|N/A|string|Specify the decrease threshold to show areas of decrease. -- Value Type: DOUBLE\noutput_raster_uri_filename|False|N/A|string|Specify a string with the fully-qualified path and filename for OUTPUT_RASTER. -- Value Type: STRING\n\n\n### Outputs\n\nThe following table lists all ENVI_ChangeThresholdClassification outputs.\nMandatory (optional) settings are listed as Required = True (Required = False).\n\n  Name  |  Required  |  Default  |  Valid Values  |  Description\n--------|:----------:|-----------|----------------|---------------\ntask_meta_data|False|N/A|directory|GBDX Option. Output location for task meta data such as execution log and output JSON\noutput_raster_uri|True|N/A|directory|Output for OUTPUT_RASTER. -- Value Type: ENVIURI\n\n\n**Output structure**\n\nThe output_raster_uri file will be written to the specified S3 Customer Account Location.\n\n\n\n### Issues\nInput rasters for the ENVI_AutoChangeThresholdClassification task will require pre-processing to fit specific input requirements.  Auto threshold may also require experimentation and iteration to find an acceptable threshold method (e.g. Kapur may not be the ideal method for a given raster dataset)\n\n### Background\nFor additional background information on this task please refer to the [Harris Geospatial ENVI documentation](http://www.harrisgeospatial.com/docs/home.html) and \n[ENVI® Change Threshold Classification](http://www.harrisgeospatial.com/docs/envichangethresholdclassificationtask.html). \n\n### Contact\nIf you have any questions or issues with this task, please contact [gbdx-support:::at:::digitalglobe.com](mailto:gbdx-support@digitalglobe.com).","excerpt":"This task lets you manually set the threshold needed to classify change detection between two images.\n\n**GBDX Registered Name**: ENVI_ChangeThresholdClassification\n**Provider**: Harris Geospatial Solutions","slug":"envi-change-threshold-classification","type":"basic","title":"ENVI® Change Threshold Classification"}

ENVI® Change Threshold Classification

This task lets you manually set the threshold needed to classify change detection between two images. **GBDX Registered Name**: ENVI_ChangeThresholdClassification **Provider**: Harris Geospatial Solutions

### Imagery Examples [block:image] { "images": [ { "image": [ "https://files.readme.io/916b834-envi_class_before_web.jpg", "envi_class_before_web.jpg", 566, 400, "#6a655e" ], "caption": "Before: Two WorldWiew 2 images taken at different times" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/bdf980d-envi_class_after_web.jpg", "envi_class_after_web.jpg", 565, 400, "#43b842" ], "caption": "After: After a change detection classification based on the above two images" } ] } [/block] ### Quickstart This is a workflow example for basic processing. [block:code] { "codes": [ { "code": "# Quickstart Example running the task name.\n\n# Initialize the Environment.\nfrom os.path import join, split\nfrom gbdxtools import Interface\ngbdx = Interface()\n\ntasks = []\noutput_location = 'ENVI/ChangeThresholdClassification'\n\n# Change Detection task setup\npre_cat_id = '103001001EC17D00'\npost_cat_id = '103001001C423600'\n\n# Pre-Image Auto ordering task parameters\npre_order = gbdx.Task(\"Auto_Ordering\")\npre_order.inputs.cat_id = pre_cat_id\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_dra = False\npre_aop.outputs.data.persist = True\npre_aop.outputs.data.persist_location = output_location+'/pre_aop'\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 = post_cat_id\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_dra = False\npost_aop.outputs.data.persist = True\npost_aop.outputs.data.persist_location = output_location+'/post_aop'\npost_aop.timeout = 36000\ntasks += [post_aop]\n\n# Create an NDVI Product from the first image\nenvi_ndvi1 = gbdx.Task(\"ENVI_SpectralIndex\")\nenvi_ndvi1.inputs.input_raster = pre_aop.outputs.data.value\nenvi_ndvi1.inputs.index = \"Normalized Difference Vegetation Index\"\ntasks += [envi_ndvi1]\n\n# Create an NDVI Product from the second image\nenvi_ndvi2 = gbdx.Task(\"ENVI_SpectralIndex\")\nenvi_ndvi2.inputs.input_raster = post_aop.outputs.data.value\nenvi_ndvi2.inputs.index = \"Normalized Difference Vegetation Index\"\ntasks += [envi_ndvi2]\n\n# Find where the images intersect\nenvi_II = gbdx.Task(\"ENVI_ImageIntersection\")\nenvi_II.inputs.input_raster1 = envi_ndvi1.outputs.output_raster_uri.value\nenvi_II.inputs.input_raster2 = envi_ndvi2.outputs.output_raster_uri.value\ntasks += [envi_II]\n\n# Calculate a difference image\nenvi_IBD = gbdx.Task(\"ENVI_ImageBandDifference\")\nenvi_IBD.inputs.input_raster1 = envi_II.outputs.output_raster1_uri.value\nenvi_IBD.inputs.input_raster2 = envi_II.outputs.output_raster2_uri.value\ntasks += [envi_IBD]\n\n# Change Threshold Classification setup\nenvi_CTC = gbdx.Task(\"ENVI_ChangeThresholdClassification\")\nenvi_CTC.inputs.increase_threshold = \"0.1\"\nenvi_CTC.inputs.decrease_threshold = \"0.5\"\nenvi_CTC.inputs.input_raster = envi_IBD.outputs.output_raster_uri.value\ntasks += [envi_CTC]\n\nworkflow = gbdx.Workflow(tasks)\nworkflow.savedata(\n envi_CTC.outputs.output_raster_uri, location=output_location\n)\n\nworkflow.execute()", "language": "python" } ] } [/block] ### Inputs The following table lists all ENVI_ChangeThresholdClassification inputs. Mandatory (optional) settings are listed as Required = True (Required = False). Name | Required | Default | Valid Values | Description --------|:----------:|-----------|----------------|--------------- file_types|False|N/A|string|GBDX Option. Comma seperated list of permitted file type extensions. Use this to filter input files -- Value Type: STRING`[*]` input_raster|True|N/A|[See ENVIRASTER input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-enviraster)|Specify a raster on which to threshold. -- Value Type: ENVIRASTER input_raster_format|False|N/A|[See ENVIRASTER input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-enviraster)|Provide the format of the image, for example: landsat-8. -- Value Type: STRING input_raster_band_grouping|False|N/A|[See ENVIRASTER input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-enviraster)|Provide the name of the band grouping to be used in the task, ie - panchromatic. -- Value Type: STRING input_raster_filename|False|N/A|[See ENVIRASTER input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-enviraster)|Provide the explicit relative raster filename that ENVI will open. This overrides any file lookup in the task runner. -- Value Type: STRING increase_threshold|False|N/A|string|Specify the increase threshold to show areas of increase. -- Value Type: DOUBLE decrease_threshold|False|N/A|string|Specify the decrease threshold to show areas of decrease. -- Value Type: DOUBLE output_raster_uri_filename|False|N/A|string|Specify a string with the fully-qualified path and filename for OUTPUT_RASTER. -- Value Type: STRING ### Outputs The following table lists all ENVI_ChangeThresholdClassification outputs. Mandatory (optional) settings are listed as Required = True (Required = False). Name | Required | Default | Valid Values | Description --------|:----------:|-----------|----------------|--------------- task_meta_data|False|N/A|directory|GBDX Option. Output location for task meta data such as execution log and output JSON output_raster_uri|True|N/A|directory|Output for OUTPUT_RASTER. -- Value Type: ENVIURI **Output structure** The output_raster_uri file will be written to the specified S3 Customer Account Location. ### Issues Input rasters for the ENVI_AutoChangeThresholdClassification task will require pre-processing to fit specific input requirements. Auto threshold may also require experimentation and iteration to find an acceptable threshold method (e.g. Kapur may not be the ideal method for a given raster dataset) ### Background For additional background information on this task please refer to the [Harris Geospatial ENVI documentation](http://www.harrisgeospatial.com/docs/home.html) and [ENVI® Change Threshold Classification](http://www.harrisgeospatial.com/docs/envichangethresholdclassificationtask.html). ### Contact If you have any questions or issues with this task, please contact [gbdx-support@digitalglobe.com](mailto:gbdx-support@digitalglobe.com).