Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: GeneralizeParameters

require(["esri/tasks/GeneralizeParameters"], function(GeneralizeParameters) { /* code goes here */ });

Description

(Added at v2.0)
Sets the geometries, maximum deviation and units for the generalize operation.

Samples

Search for samples that use this class.

Constructors

NameSummary
new GeneralizeParameters()Creates a new GeneralizeParameters object.

Properties

NameTypeSummary
deviationUnitNumber | StringThe maximum deviation unit.
geometriesGeometry[]The array of input geometries to generalize.
maxDeviationNumberThe maximum deviation for constructing a generalized geometry based on the input geometries.
Constructor Details

new GeneralizeParameters()

Creates a new GeneralizeParameters object. The constructor takes no parameters
Sample:
require([
  "esri/tasks/GeneralizeParameters", ... 
], function(GeneralizeParameters, ... ) {
  var generalizeParams = new GeneralizeParameters();
  ...
});
Property Details

<Number | String> deviationUnit

The maximum deviation unit. If the unit is not specified, units are derived from the spatial reference. See the constants table of GeometryService for a list of valid values.

<Geometry[]> geometries

The array of input geometries to generalize. All geometries in this array must be of the same geometry type (esriGeometryPolyline or esriGeometryPolygon).
Sample:
require([
  "esri/tasks/GeneralizeParameters", "dojo/_base/array", ... 
], function(GeneralizeParameters, array, ... ) {
  var generalizeParams = GeneralizeParameters();
  var geoms = array.map(featureSet.features,function(feature){
    return feature.geometry;
  });
       
  generalizeParams.geometries = geoms;
  ...
});

<Number> maxDeviation

The maximum deviation for constructing a generalized geometry based on the input geometries.
Sample:
generalizeParams.maxDeviation = 0.05;
Show Modal