Hexagon Geospatial
MENU

Spatial Modeler Tutorials

Learn more about our products, find answers, get the latest updates, and connect with other Hexagon Geospatial product users, or get support from our professional service team.
Showing results for 
Search instead for 
Do you mean 

Subset Image by Polygonal Geometries 2016

by Technical Evangelist on ‎06-08-2016 12:59 PM (2,673 Views)

Download model

 

Description:

 

A common customer request is to be able to subset using a vector polygon rather than an Area of Interest (AOI). You can almost do this in Spatial Modeler 2015, but you will get the intersection of the input image and the whole extent of the input vector layer, not the intersection with the bounding box of the selected polygon(s) (or other feature geometry types).

 

In ERDAS IMAGINE 2016 the new streaming Features currency, along with the new Define Processing Area operator (which replaces the old, global Processing Properties), enables the extent of the selected feature geometries to be used.

 

Consequently this Model enables use of an input vector file (such as a Shapefile), along with an optional attribute query to identify the feature geometries to be used, to define the geospatial shape and extent to be clipped from an input raster image to create a new output image.

 

Pixels falling outside the extent of the features, but inside the minimum bounding rectangle of the features, will be set to NoData.

 

 Landsat 8 image and Shapefile on the left, output image subsetted by selected polygon geometries on right

 

 Subset_by_Geometries_screenshot_small.png

 

feature_subset_v16-0-4.gmdx

 Subset_by_Geometries.PNG

 

 

Input parameters:

 

Input Geometry: Name of the input layer from which to identify the geometries that will be used to constrain the spatial extent of the image subsetting process. Inputs can be Shapefiles, or feature data stored in Oracle 12c or SQL Server by GeoMedia.

Input Image: Name of the input image file that will be subsetted / chipped.

Subset Filename: Name of the output image file that will be produced

Attribute Query: The geometries provided from the Input Geometry layer can be optionally filtered by a specific value or a range of values for one attribute or a combination of attributes of the features. For example, if Input Geometry contains an attribute field called ZONING and one possible type of ZONING is CITY, a query could be entered stating ZONING='CITY' to select just those geometries which meet that query. These selected geometries would then be used to define the locations to be subsetted from the Input Image. This parameter is optional and can be left blank if all geometries from the Input Geometry are to be used.

 

 Auto-generated dialog from model
 Subset_by_Geometries_GUI.PNG

   

 

 

Comments
by bucol
on ‎06-11-2018 02:18 AM

Thank Ian for this model. How would I apply this in a batch, i.e. i would like to apply the same shapefile to a number of images

 

Regards

Oliver

by mvardovs
on ‎06-11-2018 02:51 AM

Hello Oliver, 

 

You can run the model in Batch mode. Go to Spatial Modeler tab, expand Run and pick Run in Batch.

 

2018-06-11 11_34_59-Start.png

 

If you want to apply the same shapefile, the best way would be at first to hardwire it to Features Input operator by removing the Input Geometry port and providing the needed shapefile filename. Also, same can be done with the Attribute Query.

 

2018-06-11 11_34_59-Start.png

 

Kind Regards,

Marina Vardovska

HEXAGON Geospatial Support

by bucol
on ‎06-11-2018 05:12 AM

Thanks. The "hardwiring" part fixed it. Thanks.

Courses
Contributors