/*
|
* @Author : yuan
|
* @Date : 2025-12-26 11:01:31
|
* @LastEditors : yuan
|
* @LastEditTime : 2025-12-31 16:00:54
|
* @FilePath : \packages\utils\map\index.js
|
* @Description :
|
* Copyright 2025 OBKoro1, All Rights Reserved.
|
* 2025-12-26 11:01:31
|
*/
|
|
import * as Cesium from 'cesium'
|
|
|
// 获取正射影像4至点
|
export function getOrthoImageBoundaryPoints (data) {
|
const arr = JSON.parse(data)
|
|
if (arr.length !== 4) return undefined
|
|
const west = Math.min(arr[0], arr[2])
|
const east = Math.max(arr[0], arr[2])
|
const south = Math.min(arr[1], arr[3])
|
const north = Math.max(arr[1], arr[3])
|
|
return Cesium.Rectangle.fromDegrees(
|
west,
|
south,
|
east,
|
north
|
)
|
}
|