Smooth Vectors
Use the Smooth Vector tool to reduce the number of vertices in each input record of a polyline or polygon vector. The output is a new shapefile. ENVI uses the Douglas-Peucker algorithm to smooth vectors.
Note: The smoothing algorithm will not preserve the original vector topology. It will only simplify the geometry of each record without regard for adjacent records or relationships. All record attributes will be preserved without change.
Reference: Douglas, D. and T. Peucker. "Algorithms for the Reduction of the Number of Points Required to Represent a Digitized Line or its Caricature." The Canadian Cartographer 10, No. 2 (1973): 112-122.
You can also write a script to smooth vectors using the SmoothVector task.
- From the Toolbox, select Vector > Smooth Vector.
- In the Input Vector field, select a polyline or polygon shapefile, GeoPackage file, ENVI vector file, or GeoJSON file.
The units of the vector file (meters, feet, etc.) are displayed beneath the Input Vector field.
- In the Minimum Value field, specify the minimum area (for polygons) or length (for polylines) to consider. Values less than the minimum will be discarded in the output shapefile. The units depend on the coordinate system of the input vector; however, you can override these units by choosing a Units value.
- In the Maximum Value field, specify the maximum area (for polygons) or length (for polylines) to consider. Values greater than the maximum value will be discarded in the output shapefile. The units depend on the coordinate system of the input vector; however, you can override these units by choosing a Units value.
- Since the minimum and maximum areas/lengths may not be readily apparent, interactive tools are available to help you determine suitable values. Click the Select Value button next to the Minimum Value and Maximum Value fields. In the Select Minimum Area or Select Maximum Area dialogs, use the slider to select minimum and maximum areas or lengths to keep in the final shapefile. These dialogs report the percentage of records that will be dropped from the original vector files.
- Optional: From the Units drop-down list, select the units of the Minimum Value and Maximum Value, if you specified those. If you can keep the default selection of (Undefined), the units of the values will be the same as the coordinate system of the input vector. In this case, the units will be the same as the coordinate system of the input vector. However, if it is easier to specify the values in units that you are more familiar with, select the preferred units from the Units drop-down list.
- Specify the location and filename for the Output Vector.
- Enable the Preview check box to see a preview of the settings before you click OK to process the data. The preview is calculated only on the area in the view and uses the resolution level at which you are viewing the image. See Preview for details on the results. To preview a different area in your image, pan and zoom to the area of interest and re-enable the Preview option.
- Enable the Display result check box to display the output in the view when processing is complete. Otherwise, if the check box is disabled, the result can be loaded from the Data Manager.
-
To reuse these task settings in future ENVI sessions, save them to a file. Click the down arrow next to the OK button and select Save Parameter Values, then specify the location and filename to save to. Note that some parameter types, such as rasters, vectors, and ROIs, will not be saved with the file. To apply the saved task settings, click the down arrow and select Restore Parameter Values, then select the file where you previously stored your settings.
-
To run the process in the background, click the down arrow next to the OK button and select Run Task in the Background. If an ENVI Server has been set up on the network, the Run Task on remote ENVI Server name is also available. The ENVI Server Job Console will show the progress of the job and will provide a link to display the result when processing is complete. See ENVI Servers for more information.
- Click OK.
See Also
Filter Vectors, Vector to Bounding Box , Vector to Centroid, Reproject Vectors