This task estimates the crop count from a raster and a grid derived from three input points, and it creates a classification raster with their locations. See the Create Crop Location Grid topic for more information on how this tool works.
This task requires a separate license for the ENVI Crop Science Module; contact your sales representative for more information.
Example
e = ENVI()
File = Filepath('CitrusOrthophoto.dat', $
Subdir=['data','crop_science'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
Subset = ENVISubsetRaster(Raster, SUB_RECT=[12,17,653,626])
Task = ENVITask('AgCreateAndRasterizeCropLocationGrid')
Task.INPUT_RASTER = Subset
Task.POINT1 = [202.8, 613.4]
Task.POINT2 = [19.4, 611.3]
Task.POINT3 = [20.0, 306.4]
Task.SPACE1 = 12
Task.SPACE2 = 12
Task.Execute
View = e.GetView()
Layer = View.CreateLayer(Subset)
Layer2 = View.CreateLayer(Task.OUTPUT_RASTER)
Syntax
Result = ENVITask('AgCreateAndRasterizeCropLocationGrid')
Input parameters (Set, Get): CROP_DIAMETER, FIELD_ROI, FILLED, INPUT_RASTER, OUTPUT_CROPS_URI, OUTPUT_RASTER_URI, POINT1, POINT2, POINT3, SPACE1, SPACE2
Output parameters (Get only): OUTPUT_CROPS, OUTPUT_NCROPS, OUTPUT_RASTER
Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.
Input Parameters
CROP_DIAMETER (optional)
Specify the diameter of each crop in meters (or pixels if the input raster is not georeferenced).
FIELD_ROI (optional)
Specify an ENVIROI that outlines a field of crops.
FILLED (optional)
Set this parameter to true to create filled circles in the output crops classification raster.
INPUT_RASTER (required)
Specify an input raster.
OUTPUT_CROPS_URI (optional)
Specify a string with the fully-qualified path and filename for OUTPUT_CROPS.
OUTPUT_RASTER_URI (optional)
Specify a string with the fully qualified filename and path of the associated OUTPUT_RASTER.
- If you do not specify this parameter, or set it to an exclamation symbol (!), ENVI creates a temporary file.
- If you set it to the hash symbol (#), ENVI creates a file in the temporary directory, but this file will not be deleted when ENVI closes.
POINT1 (required)
Specify an array with the x and y file locations for the center of a crop. This point should be in a vertical or horizontal position relative to point 2.
POINT2 (required)
Specify an array with the x and y file locations for the center of a crop. This is the connecting point between points 1 and 3.
POINT3 (required)
Specify an array with the x and y file locations for the center of a crop. This point should be in a vertical or horizontal position relative to point 2.
SPACE1 (required)
Specify the number of spaces between points 1 and 2.
SPACE2 (required)
Specify the number of spaces between points 2 and 3.
Output Parameters
OUTPUT_CROPS
This is a reference to the output ENVIAgCrops object.
OUTPUT_NCROPS
This is the number of crops counted.
OUTPUT_RASTER
This is a reference to the output crops classification raster.
Methods
Execute
Parameter
ParameterNames
Properties
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
Version History
Crop Science 1.0.1
|
Introduced |
See Also
AgCropCount Task