Select your classified image and click OK to open the Raster To Vector Parameters dialog. Export to Vector:įrom the ENVI Toolbox select Classification | Post Classification | Classification to Vector. Be advised that this could be a time consuming process on large images with many class polygons. Once you have performed your image classification(s) and assessed the accuracy of your work, there is a simple two-step process that you can use to convert the final classified raster data into a vector file structure that can be used in ArcGIS. For these reasons, it is generally better to NOT export the classes at this stage of your analysis. Also you may want to perform post classification steps such as combining classes. While this is easy to do generally we need to perform many classifications, modifying the training regions along the way.
When you use the ENVI Classification Workflow the last step has an option to Export Classification Vectors directly to a shapefile. To perform any of these GIS functions you will need to convert the ENVI raster file to an ArcGIS shapefile. you cannot use this for zonal statistics, selection by attribute (class), or clipping and buffering other data. You need to be aware that this is an 8-bit raster image and does not have the attributes of a vector image in ArcGIS, i.e.
For example, you can open the file M圜lass.dat in ArcGIS and you will see the classified image with the colors that you have specified.
DAT” as part of the filename you can open this file directly in ArcGIS.
# Process: Iso Cluster Unsupervised ClassificationĪrcpy.gp.IsoClusterUnsupervisedClassification_sa("C:\\gdrive\\ch1\\center_sa7\\samples.tif", "4", samples_max1_tif, "20", "10", Output_signature_file)Īrcpy.Resample_management(samples_max1_tif, temp_tif, "2", "MAJORITY")Īrcpy.gp.MajorityFilter_sa(temp_tif, temp2, "EIGHT", "MAJORITY")Īrcpy.RasterToPolygon_conversion(temp2, temp2_shp, "SIMPLIFY", "VALUE")Īrcpy.Once you have created a landcover classification in ENVI you may wish to view or work with these data in ArcGIS. Samples_tif = "C:\\gdrive\\ch1\\center_sa7\\samples.tif" Here's the Python code: # Import arcpy module If you are interested in more coarse scale visualization try exporting the zones of interest to a new feature class, then aggregate and smooth the polygons.
Run the model on a small sample of data first to work out the parameters, then add the full dataset. Once the raster is generalized, convert to polygons and then dissolve polygons. In order to keep the processing to a minimum, I generalized the raster through resampling to 2 meters and ran a majority filter over the raster. Use the handy image classification tool bar located in Customize > Toolbars > Image Classification). Keep in mind that you will get better results if you use supervised maximum liklihood classification, although this skill takes practice (Hint. Unsupervised maximum likelihood classification was used on the CIR imagery. The imagery below shows the CIR tiff on the left followed by the generalized raster in the middle and the final vector product with four vegetation zones is on the right. I used 4-band 1m NAIP imagery as the model input. The model below should get you started in the right direction.