SpatialClassifier Class
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].
- SpatialClassifiers to define a set of classifiers.
- classifiers to classify a context reality model.
- SpatialModelState.classifiers to classify a persistent reality model.
Methods
Name | Description | |
---|---|---|
constructor(modelId: string, name: string, flags: SpatialClassifierFlags..., expand: number0): SpatialClassifier | Construct a new classifier. | |
clone(changedProps?: Partial<SpatialClassifierProps>): SpatialClassifier | Create a classifier identical to this one except for any properties explicitly specified by changedProps . |
|
equals(other: SpatialClassifier): boolean | Return true if this classifier is equivalent to other . |
|
equalsProps(props: SpatialClassifierProps): boolean | Return true if this classifier is equivalent to props . |
|
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. |
Properties
Name | Type | Description | |
---|---|---|---|
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. |
Defined in
Last Updated: 28 October, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.