Bounding Box with longitude and latitude ranges in degrees

Hierarchy

  • BoundingBox

Constructors

Methods

  • Bound the bounding box longitudes within the min and max possible projection values. This may result in a max longitude numerically lower than the min longitude.

    Returns

    bounded bounding box

    Parameters

    • maxProjectionLongitude: number

      max longitude of the world for the current bounding box units

    Returns BoundingBox

  • Build a Geometry Envelope from the bounding box

    Returns

    geometry envelope

    Returns GeometryEnvelope

  • Build a geometry representation of the bounding box

    Returns

    geometry, polygon or point

    Returns Geometry

  • If the bounding box spans the Anti-Meridian, attempt to get a complementary bounding box using the max longitude of the unit projection

    Returns

    complementary bounding box or nil if none

    Parameters

    • maxProjectionLongitude: number

      max longitude of the world for the current bounding box units

    Returns BoundingBox

  • If the bounding box spans the Anti-Meridian, attempt to get a complementary Web Mercator bounding box

    Returns

    complementary bounding box or nil if none

    Returns BoundingBox

  • If the bounding box spans the Anti-Meridian, attempt to get a complementary WGS84 bounding box

    Returns

    complementary bounding box or nil if none

    Returns BoundingBox

  • Determine if inclusively contains the provided bounding box

    Returns

    true if contains

    Parameters

    Returns boolean

  • Expand the bounding box max longitude above the max possible projection value if needed to create a bounding box where the max longitude is numerically larger than the min longitude.

    Returns

    expanded bounding box

    Parameters

    • maxProjectionLongitude: number

      max longitude of the world for the current bounding box units

    Returns BoundingBox

  • Expand the bounding box max longitude above the max Web Mercator projection value if needed to create a bounding box where the max longitude is numerically larger than the min longitude.

    Returns

    expanded bounding box

    Returns BoundingBox

  • Expand the bounding box max longitude above the max WGS84 projection value if needed to create a bounding box where the max longitude is numerically larger than the min longitude.

    Returns

    expanded bounding box

    Returns BoundingBox

  • Get the bounding box centroid point

    Returns

    centroid point

    Returns Point

  • Get the centroid for the bounding box and projection

    Returns

    centroid point

    Parameters

    • projection: Projection

      projection of the bounding box

    Returns Point

  • Get the centroid for the bounding box in degrees

    Returns

    centroid point

    Returns Point

  • Get the latitude range

    Returns

    latitude range

    Returns number

  • Get the longitude range

    Returns

    longitude range

    Returns number

  • Get the max latitude

    Returns

    max latitude

    Returns number

  • Get the max longitude

    Returns

    max longitude

    Returns number

  • Get the min latitude

    Returns

    min latitude

    Returns number

  • Get the min longitude

    Returns

    min longitude

    Returns number

  • Determine if intersects with the provided bounding box

    Returns

    true if intersects

    Parameters

    • boundingBox: BoundingBox

      bounding box

    • allowEmpty: boolean = false

      allow empty ranges when determining intersection

    Returns boolean

  • Determine if the bounding box is of a single point

    Returns

    true if a single point bounds

    Returns boolean

  • Set the max latitude

    Parameters

    • maxLatitude: number

      max latitude

    Returns void

  • Set the max longitude

    Parameters

    • maxLongitude: number

      max longitude

    Returns void

  • Set the min latitude

    Parameters

    • minLatitude: number

      min latitude

    Returns void

  • Set the min longitude

    Parameters

    • minLongitude: number

      min longitude

    Returns void

  • Expand the bounding box to an equally sized width and height bounding box with optional empty edge buffer

    Returns

    new square expanded bounding box

    Parameters

    • bufferPercentage: number = 0.0

      bounding box edge buffer percentage. A value of 0.1 adds a 10% buffer on each side of the squared bounding box.

    Returns BoundingBox

  • Returns a GeoJSON representation of this bounding box

    Returns Feature<Geometry, {
        [name: string]: any;
    }>

  • Transform the bounding box using the provided projection transform

    Returns

    transformed bounding box

    Parameters

    • transform: GeometryTransform | ProjectionTransform

      geometry transform

    Returns BoundingBox

  • Build a Geometry Envelope from the bounding box

    Returns

    geometry envelope

    Parameters

    Returns GeometryEnvelope

  • Build a geometry representation of the bounding box

    Returns

    geometry, polygon or point

    Parameters

    Returns Geometry

  • Get the centroid for the bounding box and projection

    Returns

    centroid point

    Parameters

    • boundingBox: BoundingBox

      bounding box

    • projection: Projection

      projection of the bounding box

    Returns Point

  • Get the centroid for a bounding box in degrees

    Returns

    centroid point

    Parameters

    Returns Point

Generated using TypeDoc