constunitsClassifier = newUnitsClassifier(); constairTransformer = create({ classifier:unitsClassifier, //specify the settings for the air class classParameters: [ { classification:"air", parameters: { clusterSize:100, minimumPoints:5 } } ] //all other classes will use the default settings });
Create a transformer with specific parameters for a particular classification
and other specific parameters for all other classifications
unitsClassifier.getClassification = function(object): string { returnobject.idasstring; }; constbigTransformer = create({ classifier:unitsClassifier, //these settings will be applied to all units defaultParameters: { clusterSize:100, minimumPoints:2 }, // Except for air units, which override some of the settings // note that the settings which are not overridden (e.g. clusterSize) // will be taken from the "defaultParameters" settings // So in this example, for this air class the clusterSize will be 100 as well classParameters: [{ classMatcher: (classification): boolean=>classification.toLowerCase() === "air", parameters: {minimumPoints:5} }] });
Create a transformer with specific configurations for different scale levels, reusing the
unitsClassifier defined above.
Create a ClusteringTransformer with default settings
Create a ClusteringTransformer with non-default settings
Create a transformer with specific parameters for a particular classification and defaults for all other classifications
Create a transformer with specific parameters for a particular classification and other specific parameters for all other classifications
Create a transformer with specific configurations for different scale levels, reusing the unitsClassifier defined above.
Using the ClusteringTransformer in combination with a FeatureLayer