@mapcatch/util 2.0.2 → 2.0.3-a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/dist/catchUtil.min.esm.js +28 -14
- package/dist/catchUtil.min.js +3 -3
- package/package.json +1 -1
- package/src/constants/crs.js +19 -12
- package/src/measure/index.js +12 -1
- package/src/transform.js +3 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
## v1.0.2
|
|
2
|
+
|
|
3
|
+
- [fix] 修复图片解析报错的问题。
|
|
4
|
+
|
|
5
|
+
## v1.0.3
|
|
6
|
+
|
|
7
|
+
- [fix] 修复`util.formatDate(date)`日期一直是当前日期的bug
|
|
8
|
+
- [add] 增加`util.getTaskTreeList()`工具函数
|
|
9
|
+
- [add] 增加`layerGroups`、`bmapTypes`、`colors`、`defaultLayers`、`layerFolders`、`layerIcons`、`mapViewModes`、`taskParams`、`tools`常量
|
|
10
|
+
|
|
11
|
+
## v1.0.4
|
|
12
|
+
|
|
13
|
+
- [add] 常量`layerGroups`增加覆盖物分组
|
|
14
|
+
- [add] 常量`layerIcons`增加overlay/geojson/raster/object类型图标
|
|
15
|
+
|
|
16
|
+
## v1.0.5
|
|
17
|
+
|
|
18
|
+
- [fix] 地图底图的服务地址修改为https协议
|
|
19
|
+
- [fix] 工具函数`diffLayers`增加覆盖物图层更新的比较
|
|
20
|
+
|
|
21
|
+
## v1.0.6
|
|
22
|
+
|
|
23
|
+
- [improve] `util.getPhotoInfo`函数返回值增加图像的width和height
|
|
24
|
+
|
|
25
|
+
## v1.0.7
|
|
26
|
+
|
|
27
|
+
- [fix] 修复获取exif中可能存在宽高错误的问题
|
|
28
|
+
- [improve] 获取照片属性时没有GPS也会返回其他的属性信息
|
|
29
|
+
|
|
30
|
+
## v1.0.8
|
|
31
|
+
|
|
32
|
+
- [improve] 支持tiff等其他格式图片获取宽高
|
|
33
|
+
|
|
34
|
+
## v1.0.9
|
|
35
|
+
|
|
36
|
+
- [fix] 修复华为相机的照片解析失败的问题
|
|
37
|
+
|
|
38
|
+
## v1.0.10
|
|
39
|
+
|
|
40
|
+
- [add] 增加`util.hasNaN()`和`util.getRotationMatrix()`接口
|
|
41
|
+
- [add] 增加常量`crsTypes` `measurementFields`
|
|
42
|
+
- [improve] 更新常量`defaultLayers`和`layerFolders`
|
|
43
|
+
- [delete] 删除`getPhotoTags`接口
|
|
44
|
+
|
|
45
|
+
## v1.0.11
|
|
46
|
+
|
|
47
|
+
- [add] 增加`util.getWKTString(epsg_code)`接口
|
|
48
|
+
- [add] 增加常量`crsList`
|
|
49
|
+
|
|
50
|
+
## v1.0.12
|
|
51
|
+
|
|
52
|
+
- [improve] 点标注的显示字段增加经度(lng)和纬度(lat)
|
|
53
|
+
|
|
54
|
+
## v1.0.13
|
|
55
|
+
|
|
56
|
+
- [improve] diffLayers检查所有图层的metadata,有变化则提交更新
|
|
57
|
+
|
|
58
|
+
## v1.0.14
|
|
59
|
+
|
|
60
|
+
- [improve] addIcons2Map支持sdf符号
|
|
61
|
+
|
|
62
|
+
## v2.0.3
|
|
63
|
+
|
|
64
|
+
- [add] 增加坐标转换函数库
|
|
65
|
+
- [add] 增加量测工具集
|
|
66
|
+
- [add] 增加空三解析工具集
|
|
67
|
+
- [add] 增加报告生成函数
|
|
68
|
+
- [improve] 坐标系列表增加“常用坐标系”分组
|
|
@@ -6912,18 +6912,25 @@ const layerGroups = [
|
|
|
6912
6912
|
}
|
|
6913
6913
|
}, crsList = [
|
|
6914
6914
|
{
|
|
6915
|
-
type: "
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6915
|
+
type: "COMMON",
|
|
6916
|
+
alias: "Common",
|
|
6917
|
+
title: "\u5E38\u7528\u5750\u6807\u7CFB",
|
|
6918
|
+
children: [
|
|
6919
|
+
{
|
|
6920
|
+
type: "GEOGCS",
|
|
6921
|
+
title: "WGS 84",
|
|
6922
|
+
authName: "EPSG",
|
|
6923
|
+
authCode: 4326,
|
|
6924
|
+
wkt: 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]'
|
|
6925
|
+
},
|
|
6926
|
+
{
|
|
6927
|
+
type: "GEOGCS",
|
|
6928
|
+
title: "China Geodetic Coordinate System 2000",
|
|
6929
|
+
authName: "EPSG",
|
|
6930
|
+
authCode: 4490,
|
|
6931
|
+
wkt: 'GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]]'
|
|
6932
|
+
}
|
|
6933
|
+
]
|
|
6927
6934
|
},
|
|
6928
6935
|
{
|
|
6929
6936
|
type: "PROJCS",
|
|
@@ -55333,7 +55340,7 @@ includedProjections(proj4);
|
|
|
55333
55340
|
function getWKTString(t) {
|
|
55334
55341
|
let { type: o, epsg_code: R } = t;
|
|
55335
55342
|
for (let c = 0; c < crsList.length; c++) {
|
|
55336
|
-
if (crsTypes[crsList[c].type].code !== o)
|
|
55343
|
+
if (!crsTypes[crsList[c].type] || crsTypes[crsList[c].type].code !== o)
|
|
55337
55344
|
continue;
|
|
55338
55345
|
let { authCode: d, wkt: H, children: n } = crsList[c];
|
|
55339
55346
|
if (d == R)
|
|
@@ -112733,7 +112740,7 @@ class Measurement {
|
|
|
112733
112740
|
getArea(o) {
|
|
112734
112741
|
let R = [], c, h = [o.map((D) => [D[0], D[1]]), o.map((D) => [D[0], D[2]]), o.map((D) => [D[1], D[2]])], d = h[0];
|
|
112735
112742
|
for (; !R.length && h.length; ) {
|
|
112736
|
-
c = h.shift(), c.
|
|
112743
|
+
c = h.shift(), c = this._reduceCoordinates(c);
|
|
112737
112744
|
let D = [];
|
|
112738
112745
|
c.forEach((j, z) => {
|
|
112739
112746
|
z === c.length - 1 ? D.push([z, 0]) : D.push([z, z + 1]);
|
|
@@ -112753,6 +112760,13 @@ class Measurement {
|
|
|
112753
112760
|
let h = this.getDistance3D([o, R]), d = this.getDistance3D([R, c]), H = this.getDistance3D([c, o]);
|
|
112754
112761
|
return Math.sqrt((h + d + H) * (h + d - H) * (h + H - d) * (d + H - h)) / 4;
|
|
112755
112762
|
}
|
|
112763
|
+
_reduceCoordinates(o) {
|
|
112764
|
+
for (let R = 0; R < o.length; R++) {
|
|
112765
|
+
let c = R === o.length - 1 ? 0 : R + 1;
|
|
112766
|
+
_.isEqual(o[R], o[c]) && (o.splice(R, 1), R--);
|
|
112767
|
+
}
|
|
112768
|
+
return o;
|
|
112769
|
+
}
|
|
112756
112770
|
}
|
|
112757
112771
|
export {
|
|
112758
112772
|
Event$1 as Event,
|