The primary purpose of this spatial model is to show how to use the new (to ERDAS IMAGINE / SMSDK 2020) Create Dice Boundaries operator to create a regular grid of area geometries over an image. This is useful for purposes such as Zonal Change Detection and Deep Learning feature extraction, especially to produce a grid not possible in those applications, such as a grid where the polygons have overlap.
|Overlapping square polygons created over a satellite image|
The primary use for Create Dice Boundaries was to replicate the functionary provided by the old Dice Image dialog. The Dice Image dialog takes as input an image file and a set of parameters which define how to break that image up into many equal sized and potentially overlapping chips. So the Create Dice Boundaries operator was implemented to create the boundary definitions that you might wish to use for purposes such as subsetting an image. You can find the Spatial Model which performs the Dice Image function in $IMAGINE_HOME\etc\models\diceimage.gmdx
The Create Dice Boundaries operator generates a List of Boundaries, not a Features stream. So the first task is to take the List of Boundaries and read it through a Features Input operator to turn the Boundaries into a Features stream.
The Create Dice Boundaries operator also creates Boundaries (and subsequently area geometries via the Features Input) in an "image space" coordinate system (grid coordinates). So to create Features which can be overlaid with the original data, or other geospatial data, the features geometries have to be re-associated with the Coordinate Reference System (CRS) of the input image. So the Dictionary Item operator is used to mine the Metadata of the input raster to determine the value associated with its Boundary.CRS key. That is then used as the TargetCRS input to the Coordinate Transformation operator. This transforms the "image space" coordinates into the same CRS as the input image. The area geometries can then be successfully overlaid onto the input image in a Preview or written to an output vector file for use in other tools.
You must have Spatial Modeler 2020, or later, installed to use this Spatial Model.