This task converts geometry-based regions of interest (ROIs) to GeoJSON features.
Example
e = ENVI()
File = Filepath('qb_boulder_roi.xml', Subdir=['data'], $
Root_Dir=e.Root_Dir)
rois = e.OpenROI(File)
task = ENVITask('ROIToGeoJSON')
task.Input_ROI = rois[2]
outFile = e.GetTemporaryFilename('.json')
task.Output_GeoJSON_URI = outFile
task.Execute
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
API Version
4.3
See Also
ENVITask, GeoJSONToROI Task, ExtractGeoJSONFromFile Task