diff --git a/modules/culling/src/lib/algorithms/bounding-box-from-region.ts b/modules/culling/src/lib/algorithms/bounding-box-from-region.ts index f6b3d12..8d2a691 100644 --- a/modules/culling/src/lib/algorithms/bounding-box-from-region.ts +++ b/modules/culling/src/lib/algorithms/bounding-box-from-region.ts @@ -9,7 +9,7 @@ import {OrientedBoundingBox} from "../bounding-volumes/oriented-bounding-box"; import {degrees, Vector2, Vector3, _MathUtils} from "@math.gl/core"; // @ts-ignore // eslint-disable-next-line import/no-unresolved -import {Ellipsoid, Rectangle} from '@math.gl/geospatial'; +import {Ellipsoid, GeoRectangle} from '@math.gl/geospatial'; import {EllipsoidTangentPlane} from "../ellipsoid-tangent-plane"; import {Plane} from "../plane"; @@ -61,14 +61,14 @@ export function makeOrientedBoundingBoxFromRegion (region: number[]) { let maxX: number; let maxY: number; let maxZ: number; let minX: number; let minY: number; let minZ: number; let plane: Plane; - const rectangle = new Rectangle(west, south, east, north); - const tangentPoint = Rectangle.center(rectangle, scratchTangentPoint); + const geoRectangle = new GeoRectangle(west, south, east, north); + const tangentPoint = GeoRectangle.center(geoRectangle, scratchTangentPoint); const tangentPointCartographic = new Vector3([degrees(tangentPoint.x), degrees(tangentPoint.y), 0.0]); const lonCenter = tangentPoint.x; const lonCenterDeg = tangentPointCartographic.x; - if (rectangle.width <= _MathUtils.PI) { + if (geoRectangle.width <= _MathUtils.PI) { const westDeg = degrees(west); const tangentPoint = Ellipsoid.WGS84.cartographicToCartesian(tangentPointCartographic); diff --git a/modules/geospatial/src/rectangle.ts b/modules/geospatial/src/geo-rectangle.ts similarity index 95% rename from modules/geospatial/src/rectangle.ts rename to modules/geospatial/src/geo-rectangle.ts index b7a796a..e2693a4 100644 --- a/modules/geospatial/src/rectangle.ts +++ b/modules/geospatial/src/geo-rectangle.ts @@ -8,7 +8,7 @@ import {Vector3, negativePiToPi, _MathUtils} from '@math.gl/core' /** A two dimensional region specified as longitude and latitude coordinates. */ -export class Rectangle { +export class GeoRectangle { west: number; south: number; east: number; @@ -36,7 +36,7 @@ export class Rectangle { * @param [result] The object onto which to store the result. * @returns The modified result parameter or a new Cartographic instance if none was provided. */ - static center(rectangle: Rectangle, result?: Vector3) { + static center(rectangle: GeoRectangle, result?: Vector3) { if (!result) result = new Vector3() diff --git a/modules/geospatial/src/index.ts b/modules/geospatial/src/index.ts index a02d144..b1a4245 100644 --- a/modules/geospatial/src/index.ts +++ b/modules/geospatial/src/index.ts @@ -3,5 +3,5 @@ // Copyright (c) vis.gl contributors export {Ellipsoid} from './ellipsoid/ellipsoid'; -export {Rectangle} from './rectangle'; +export {GeoRectangle} from './geo-rectangle'; export {isWGS84} from './type-utils';