Orbit 3D Mapping Viewer SDK
    Preparing search index...

    Class Bounds

    Class Bounds defines a spatial bounding box in 2D or 3D. It has a coordinate reference system (CRS) and can be valid or invalid.

    Index

    Constructors

    • Create new (invalid) bounds.

      Parameters

      • crs: string

        the EPSG CRS code of the bounds, like "4326" for example.

      Returns Bounds

    Properties

    crs: string

    The EPSG CRS code, like "4326" for example

    is3D: boolean

    Do the bounds have a Z value? (if valid)

    maxX: number

    The maximum X value (if valid)

    maxY: number

    The maximum Y value (if valid)

    maxZ: number

    The maximum Z value (if valid)

    minX: number

    The minimum X value (if valid)

    minY: number

    The minimum Y value (if valid)

    minZ: number

    The minimum Z value (if valid)

    valid: boolean

    Do these bounds have a valid spatial extent?

    Methods

    • Add a coordinate to the bounds.

      Parameters

      Returns void

    • Add a 2D coordinate using X and Y.

      Parameters

      • x: number

        the X value to add.

      • y: number

        the Y value to add.

      Returns void

    • Add a 3D coordinate using X, Y and Z. Note that this makes this instance a 3D bounds instance.

      Parameters

      • x: number

        the X value to add.

      • y: number

        the Y value to add.

      • z: number

        the Z value to add.

      Returns void

    • Get the center coordinate.

      Returns Coordinate

      returns null if these bounds are not valid.

    • Get the depth (along the Z axis) of these bounds.

      Returns number

      returns 0.0 if these bounds are not valid or not 3D.

    • Get the height (along the Y axis) of these bounds.

      Returns number

      returns 0.0 if these bounds are not valid.

    • Get the width (along the X axis) of these bounds.

      Returns number

      returns 0.0 if these bounds are not valid.

    • Convert the object to a string.

      Returns string

      the string form of the object.

    • Create new 2D bounds.

      Parameters

      • crs: string

        the EPSG CRS code of the bounds, like "4326" for example.

      • minX: number

        the minimum X value.

      • minY: number

        the minimum Y value.

      • maxX: number

        the maximum X value.

      • maxY: number

        the maximum Y value.

      Returns Bounds

      the new bounds.

    • Create new 3D bounds.

      Parameters

      • crs: string

        the EPSG CRS code of the bounds, like "4326" for example.

      • minX: number

        the minimum X value.

      • minY: number

        the minimum Y value.

      • minZ: number

        the minimum Z value.

      • maxX: number

        the maximum X value.

      • maxY: number

        the maximum Y value.

      • maxZ: number

        the maximum Z value.

      Returns Bounds

      the new bounds.