Contour Class
Describes how to generate and style contour lines for geometry within a single ContourGroup.
Contours provide a way to visualize elevation within a 3d scene by drawing lines at fixed intervals along the z-axis.
There are actually 2 kinds of contour lines: major and minor. Each kind can be styled independently.
A contour line is generated every minorInterval meters. Every nth line will be a major contour, where n = majorIntervalCount; the intervening lines will
all be minor contours.
For example, with a majorIntervalCount of 1, every contour will be major; of 2, every other contour will be major; and of 3, there will be two minor contours in between
each major contour.
Methods
| Name | Description | |
|---|---|---|
| clone(changedProps?: Partial<ContourProperties>): Contour | Create a copy of this Contour, identical except for any properties specified by changedProps. |
|
| compare(other: Contour): number | Performs ordered comparison between this and another contour. | |
| equals(other: Contour): boolean | Returns true if this is logically equivalent to other. |
|
| toJSON(): ContourProps | ||
| compare(lhs: Contour, rhs: Contour): number Static | Performs ordered comparison of two contours. | |
| create(props?: Partial<ContourProperties>): Contour Static | Create a new Contour. | |
| fromJSON(props?: ContourProps): Contour Static |
Properties
| Name | Type | Description | |
|---|---|---|---|
| defaults Static Readonly | Contour | ||
| majorIntervalCount Readonly | number | The count of minor contour intervals that define a major interval (integer > 0). | |
| majorStyle Readonly | ContourStyle | Settings that describe how a major contour is styled. | |
| minorInterval Readonly | number | The interval for the minor contour occurrence in meters; these can be specified as fractional. | |
| minorStyle Readonly | ContourStyle | Settings that describe how a minor contour is styled. | |
| showGeometry Readonly | boolean | If true, show underlying geometry along with the associated contours. |
Defined in
- core/common/src/ContourDisplay.ts Line 158
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.