ROIToGeoJSON Task

This task converts geometry-based regions of interest (ROIs) to GeoJSON features.

Example

; Start the application

e = ENVI()

 

; Open an ROI file

File = Filepath('qb_boulder_roi.xml', Subdir=['data'], $

  Root_Dir=e.Root_Dir)

rois = e.OpenROI(File)

 

; Get the task from the catalog of ENVITasks

task = ENVITask('ROIToGeoJSON')

 

; Define task inputs

task.Input_ROI = rois[2]

outFile = e.GetTemporaryFilename('.json')

task.Output_GeoJSON_URI = outFile

 

; Run the task

task.Execute

 

; Display the result

xdisplayfile, outFile

Syntax

Result = ENVITask('ROIToGeoJSON')

Input properties (Set, Get): INPUT_ROI, OUTPUT_GEOJSON_URI

Output properties (Get only): OUTPUT_GEOJSON

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

Methods

This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties

This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

INPUT_ROI (required)

Specify the ENVI ROIs to convert to GeoJSON. Only geometry-based ROIs are supported; pixel ROIs are not.

OUTPUT_GEOJSON

This is a reference to the output GeoJSON object.

OUTPUT_GEOJSON_URI (optional)

Specify a string with the fully-qualified path and filename for the GeoJSON file.

Version History

ENVI 5.5.3

Introduced

API Version

4.2

See Also

ENVITask, GeoJSONToROI Task, ExtractGeoJSONFromFile Task