Describes how to use the geometry of one GeometricModel to classify the contents of other models - most typically, reality models. Applying a classifier divides the geometry of the classified model into two groups:
- Classified (intersecting the classifier); and
- Unclassified (not intersecting the classifier). For example, a model containing the building footprints for a city block could be used to classify a reality mesh captured from photographs of the real-world block. Then, buildings within the reality mesh can be selected individually, and present the properties of the classifier geometry (e.g., the address of the building). The appearance of the geometry can also be customized based using SpatialClassifierInsideDisplay and SpatialClassifierOutsideDisplay. Two types of classification are supported:
- Planar classification, in which the geometry of the classifier model is projected onto a plane to classify geometry within a region extruded perpendicular the plane (e.g., the building footprints example); and
- Volume classification, in which closed, non-intersecting volumes within the classifier classify geometry that intersects (i.e. is contained within) those same volumes (e.g., imagine using boxes instead of footprints to classify buildings, or floors of buildings).
see this (interactive example)[https://www.itwinjs.org/sample-showcase/?group=Viewer+Features&sample=classifier-sample].
see SpatialClassifiers to define a set of classifiers.
see ContextRealityModel.classifiers to classify a context reality model.
see SpatialModelState.classifiers to classify a persistent reality model.
|constructor(modelId: string, name: string, flags: SpatialClassifierFlags = ..., expand: number = 0): SpatialClassifier||Construct a new classifier.|
|clone(changedProps?: Partial<SpatialClassifierProps>): SpatialClassifier||Create a classifier identical to this one except for any properties explicitly specified by
|equals(other: SpatialClassifier): boolean||Return true if this classifier is equivalent to
|equalsProps(props: SpatialClassifierProps): boolean||Return true if this classifier is equivalent to
|toJSON(): SpatialClassifierProps||Convert to JSON representation.|
|fromJSON(props: SpatialClassifierProps): SpatialClassifier Static||Construct from JSON representation.|
|fromModelMapLayer(mapLayer: ModelMapLayerSettings): SpatialClassifier Static||Construct from Model Map Layer.||Beta|
|expand Readonly||number||A distance in meters by which to expand the classifier geometry.|
|flags Readonly||SpatialClassifierFlags||Flags controlling how to apply the classifier.|
|modelId Readonly||string||The Id of the GeometricModel whose geometry is used to produce the classifier.|
|name Readonly||string||A user-friendly name, useful for identifying individual classifiers within a SpatialClassifiers.|
Last Updated: 06 January, 2023