@mapcatch/util 2.0.6 → 2.0.8
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/dist/catchUtil.min.cjs.js +2928 -0
- package/dist/catchUtil.min.esm.js +44502 -42814
- package/dist/catchUtil.min.js +248 -248
- package/package.json +11 -2
- package/src/constants/annotation_color.js +0 -7
- package/src/constants/annotation_draw_style.js +0 -228
- package/src/constants/annotation_label_style.js +0 -76
- package/src/constants/annotation_style.js +0 -118
- package/src/constants/bmap_types.js +0 -44
- package/src/constants/cameras.js +0 -5
- package/src/constants/crs.js +0 -42099
- package/src/constants/crs_types.js +0 -22
- package/src/constants/default_layers.js +0 -149
- package/src/constants/dsm_colors.js +0 -10
- package/src/constants/error_codes.js +0 -44
- package/src/constants/height_colors.js +0 -1
- package/src/constants/index.js +0 -20
- package/src/constants/layer_folders.js +0 -6
- package/src/constants/layer_groups.js +0 -34
- package/src/constants/layer_groups_multispectral.js +0 -34
- package/src/constants/layer_icons.js +0 -19
- package/src/constants/map_style.js +0 -11
- package/src/constants/measurement_fields.js +0 -208
- package/src/constants/task_params.js +0 -33
- package/src/constants/tools.js +0 -20
- package/src/event/event.js +0 -191
- package/src/event/event_bus.js +0 -5
- package/src/event/index.js +0 -2
- package/src/gl-operations/constants.js +0 -9
- package/src/gl-operations/default_options.js +0 -98
- package/src/gl-operations/index.js +0 -533
- package/src/gl-operations/reglCommands/contours.js +0 -27
- package/src/gl-operations/reglCommands/default.js +0 -46
- package/src/gl-operations/reglCommands/hillshading.js +0 -340
- package/src/gl-operations/reglCommands/index.js +0 -6
- package/src/gl-operations/reglCommands/multiLayers.js +0 -303
- package/src/gl-operations/reglCommands/transitions.js +0 -111
- package/src/gl-operations/reglCommands/util.js +0 -71
- package/src/gl-operations/renderer.js +0 -210
- package/src/gl-operations/shaders/fragment/convertDem.js +0 -26
- package/src/gl-operations/shaders/fragment/convolutionSmooth.js +0 -55
- package/src/gl-operations/shaders/fragment/diffCalc.js +0 -34
- package/src/gl-operations/shaders/fragment/drawResult.js +0 -47
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvAmbientShadows.js +0 -79
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvDirect.js +0 -60
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvFinalBaselayer.js +0 -31
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvFinalColorscale.js +0 -61
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvMergeAndScaleTiles.js +0 -27
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvNormals.js +0 -26
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvSmooth.js +0 -54
- package/src/gl-operations/shaders/fragment/hillshading/hsAdvSoftShadows.js +0 -81
- package/src/gl-operations/shaders/fragment/hillshading/hsPregen.js +0 -55
- package/src/gl-operations/shaders/fragment/interpolateColor.js +0 -66
- package/src/gl-operations/shaders/fragment/interpolateColorOnly.js +0 -50
- package/src/gl-operations/shaders/fragment/interpolateValue.js +0 -137
- package/src/gl-operations/shaders/fragment/multiAnalyze1Calc.js +0 -36
- package/src/gl-operations/shaders/fragment/multiAnalyze2Calc.js +0 -46
- package/src/gl-operations/shaders/fragment/multiAnalyze3Calc.js +0 -54
- package/src/gl-operations/shaders/fragment/multiAnalyze4Calc.js +0 -62
- package/src/gl-operations/shaders/fragment/multiAnalyze5Calc.js +0 -70
- package/src/gl-operations/shaders/fragment/multiAnalyze6Calc.js +0 -78
- package/src/gl-operations/shaders/fragment/single.js +0 -93
- package/src/gl-operations/shaders/transform.js +0 -22
- package/src/gl-operations/shaders/util/computeColor.glsl +0 -85
- package/src/gl-operations/shaders/util/getTexelValue.glsl +0 -10
- package/src/gl-operations/shaders/util/isCloseEnough.glsl +0 -9
- package/src/gl-operations/shaders/util/rgbaToFloat.glsl +0 -18
- package/src/gl-operations/shaders/vertex/double.js +0 -17
- package/src/gl-operations/shaders/vertex/multi3.js +0 -20
- package/src/gl-operations/shaders/vertex/multi4.js +0 -23
- package/src/gl-operations/shaders/vertex/multi5.js +0 -26
- package/src/gl-operations/shaders/vertex/multi6.js +0 -29
- package/src/gl-operations/shaders/vertex/single.js +0 -13
- package/src/gl-operations/shaders/vertex/singleNotTransformed.js +0 -12
- package/src/gl-operations/texture_manager.js +0 -141
- package/src/gl-operations/util.js +0 -336
- package/src/index.js +0 -20
- package/src/measure/index.js +0 -209
- package/src/measure/tile_cache.js +0 -88
- package/src/mvs/index.js +0 -26
- package/src/mvs/protos/index.js +0 -12
- package/src/mvs/protos/proto_10.js +0 -155
- package/src/observation_pretict.js +0 -168
- package/src/photo-parser/exif/gps_tags.js +0 -33
- package/src/photo-parser/exif/ifd1_tags.js +0 -22
- package/src/photo-parser/exif/index.js +0 -143
- package/src/photo-parser/exif/parse_image.js +0 -290
- package/src/photo-parser/exif/string_values.js +0 -137
- package/src/photo-parser/exif/tags.js +0 -75
- package/src/photo-parser/exif/tiff_tags.js +0 -35
- package/src/photo-parser/exif/util.js +0 -103
- package/src/photo-parser/image-size/detector.js +0 -24
- package/src/photo-parser/image-size/fromFile.js +0 -55
- package/src/photo-parser/image-size/index.js +0 -2
- package/src/photo-parser/image-size/lookup.js +0 -37
- package/src/photo-parser/image-size/types/bmp.js +0 -10
- package/src/photo-parser/image-size/types/cur.js +0 -16
- package/src/photo-parser/image-size/types/dds.js +0 -10
- package/src/photo-parser/image-size/types/gif.js +0 -11
- package/src/photo-parser/image-size/types/heif.js +0 -35
- package/src/photo-parser/image-size/types/icns.js +0 -112
- package/src/photo-parser/image-size/types/ico.js +0 -74
- package/src/photo-parser/image-size/types/index.js +0 -43
- package/src/photo-parser/image-size/types/j2c.js +0 -11
- package/src/photo-parser/image-size/types/jp2.js +0 -22
- package/src/photo-parser/image-size/types/jpg.js +0 -157
- package/src/photo-parser/image-size/types/ktx.js +0 -18
- package/src/photo-parser/image-size/types/png.js +0 -36
- package/src/photo-parser/image-size/types/pnm.js +0 -74
- package/src/photo-parser/image-size/types/psd.js +0 -10
- package/src/photo-parser/image-size/types/svg.js +0 -100
- package/src/photo-parser/image-size/types/tga.js +0 -14
- package/src/photo-parser/image-size/types/tiff.js +0 -92
- package/src/photo-parser/image-size/types/utils.js +0 -83
- package/src/photo-parser/image-size/types/webp.js +0 -67
- package/src/photo-parser/index.js +0 -185
- package/src/report/annotations_report.js +0 -446
- package/src/report/index.js +0 -2
- package/src/report/map_util.js +0 -81
- package/src/report/pdf_creator.js +0 -247
- package/src/report/report.js +0 -581
- package/src/transform.js +0 -207
- package/src/util.js +0 -671
package/src/event/event.js
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import {extend, endsWith} from '../util'
|
|
2
|
-
|
|
3
|
-
let clickPoint = null
|
|
4
|
-
|
|
5
|
-
function _addEventListener (type, listener, listenerList) {
|
|
6
|
-
listenerList[type] = listenerList[type] || []
|
|
7
|
-
listenerList[type].push(listener)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function _removeEventListener (type, listener, listenerList) {
|
|
11
|
-
if (listenerList && listenerList[type]) {
|
|
12
|
-
if (!listener) {
|
|
13
|
-
delete listenerList[type]
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
const index = listenerList[type].indexOf(listener)
|
|
17
|
-
if (index !== -1) {
|
|
18
|
-
listenerList[type].splice(index, 1)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Methods mixed in to other classes for event capabilities.
|
|
25
|
-
*
|
|
26
|
-
* @mixin Evented
|
|
27
|
-
*/
|
|
28
|
-
class Event {
|
|
29
|
-
constructor () {
|
|
30
|
-
this._listeners = []
|
|
31
|
-
this._oneTimeListeners = []
|
|
32
|
-
this._eventedParent = null
|
|
33
|
-
this._eventedParentData = null
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Adds a listener to a specified event type.
|
|
38
|
-
*
|
|
39
|
-
* @param {string} type The event type to add a listen for.
|
|
40
|
-
* @param {Function} listener The function to be called when the event is fired.
|
|
41
|
-
* The listener function is called with the data object passed to `fire`,
|
|
42
|
-
* extended with `target` and `type` properties.
|
|
43
|
-
* @returns {Object} `this`
|
|
44
|
-
*/
|
|
45
|
-
on (type, listener) {
|
|
46
|
-
this._listeners = this._listeners || {}
|
|
47
|
-
//将this._listeners 添加listener事件
|
|
48
|
-
_addEventListener(type, listener, this._listeners)
|
|
49
|
-
//返回的this 就是实例Vmap
|
|
50
|
-
return this
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Removes a previously registered event listener.
|
|
55
|
-
*
|
|
56
|
-
* @param {string} type The event type to remove listeners for.
|
|
57
|
-
* @param {Function} listener The listener function to remove.
|
|
58
|
-
* @returns {Object} `this`
|
|
59
|
-
*/
|
|
60
|
-
off (type, listener) {
|
|
61
|
-
_removeEventListener(type, listener, this._listeners)
|
|
62
|
-
_removeEventListener(type, listener, this._oneTimeListeners)
|
|
63
|
-
|
|
64
|
-
return this
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Adds a listener that will be called only once to a specified event type.
|
|
69
|
-
*
|
|
70
|
-
* The listener will be called first time the event fires after the listener is registered.
|
|
71
|
-
*
|
|
72
|
-
* @param {string} type The event type to listen for.
|
|
73
|
-
* @param {Function} listener The function to be called when the event is fired the first time.
|
|
74
|
-
* @returns {Object} `this`
|
|
75
|
-
*/
|
|
76
|
-
once (type, listener) {
|
|
77
|
-
this._oneTimeListeners = this._oneTimeListeners || {}
|
|
78
|
-
_addEventListener(type, listener, this._oneTimeListeners)
|
|
79
|
-
|
|
80
|
-
return this
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Fires an event of the specified type.
|
|
85
|
-
*
|
|
86
|
-
* @param {string} type The type of event to fire.
|
|
87
|
-
* @param {Object} [data] Data to be passed to any listeners.
|
|
88
|
-
* @returns {Object} `this`
|
|
89
|
-
*/
|
|
90
|
-
fire (type, data) {
|
|
91
|
-
if (this.listens(type)) {
|
|
92
|
-
data = extend({}, data, { type: type, target: this })
|
|
93
|
-
//通过判断点击的点位置是否相同来进行e的输出
|
|
94
|
-
if (clickPoint) {
|
|
95
|
-
if(data.point && (clickPoint === (data.point.x + data.point.y))) {
|
|
96
|
-
if (clickPoint === (data.point.x + data.point.y)){
|
|
97
|
-
return
|
|
98
|
-
} else {
|
|
99
|
-
clickPoint = data.point.x + data.point.y
|
|
100
|
-
}
|
|
101
|
-
} else if (data.feature) {
|
|
102
|
-
if (clickPoint === (data.x + data.y)){
|
|
103
|
-
return
|
|
104
|
-
} else {
|
|
105
|
-
clickPoint = data.x + data.y
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
if(data.point) {
|
|
110
|
-
clickPoint = data.point.x + data.point.y
|
|
111
|
-
} else if (data.feature) {
|
|
112
|
-
clickPoint = data.x + data.y
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// make sure adding or removing listeners inside other listeners won't cause an infinite loop
|
|
117
|
-
const listeners =
|
|
118
|
-
this._listeners && this._listeners[type]
|
|
119
|
-
? this._listeners[type].slice()
|
|
120
|
-
: []
|
|
121
|
-
|
|
122
|
-
for (let i = 0; i < listeners.length; i++) {
|
|
123
|
-
listeners[i].call(this, data)
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const oneTimeListeners =
|
|
127
|
-
this._oneTimeListeners && this._oneTimeListeners[type]
|
|
128
|
-
? this._oneTimeListeners[type].slice()
|
|
129
|
-
: []
|
|
130
|
-
|
|
131
|
-
for (let i = 0; i < oneTimeListeners.length; i++) {
|
|
132
|
-
oneTimeListeners[i].call(this, data)
|
|
133
|
-
_removeEventListener(type, oneTimeListeners[i], this._oneTimeListeners)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
if (this._eventedParent) {
|
|
137
|
-
this._eventedParent.fire(
|
|
138
|
-
type,
|
|
139
|
-
extend(
|
|
140
|
-
{},
|
|
141
|
-
data,
|
|
142
|
-
typeof this._eventedParentData === 'function'
|
|
143
|
-
? this._eventedParentData()
|
|
144
|
-
: this._eventedParentData
|
|
145
|
-
)
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// To ensure that no error events are dropped, print them to the
|
|
150
|
-
// console if they have no listeners.
|
|
151
|
-
} else if (endsWith(type, 'error')) {
|
|
152
|
-
// eslint-disable-next-line
|
|
153
|
-
console.error((data && data.error) || data || 'Empty error event')
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return this
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.
|
|
161
|
-
*
|
|
162
|
-
* @param {string} type The event type
|
|
163
|
-
* @returns {boolean} `true` if there is at least one registered listener for specified event type, `false` otherwise
|
|
164
|
-
*/
|
|
165
|
-
listens (type) {
|
|
166
|
-
return (
|
|
167
|
-
(this._listeners &&
|
|
168
|
-
this._listeners[type] &&
|
|
169
|
-
this._listeners[type].length > 0) ||
|
|
170
|
-
(this._oneTimeListeners &&
|
|
171
|
-
this._oneTimeListeners[type] &&
|
|
172
|
-
this._oneTimeListeners[type].length > 0) ||
|
|
173
|
-
(this._eventedParent && this._eventedParent.listens(type))
|
|
174
|
-
)
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Bubble all events fired by this instance of Evented to this parent instance of Evented.
|
|
179
|
-
*
|
|
180
|
-
* @private
|
|
181
|
-
* @returns {Object} `this`
|
|
182
|
-
*/
|
|
183
|
-
setEventedParent (parent, data) {
|
|
184
|
-
this._eventedParent = parent
|
|
185
|
-
this._eventedParentData = data
|
|
186
|
-
|
|
187
|
-
return this
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export default Event
|
package/src/event/event_bus.js
DELETED
package/src/event/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const CLEAR_COLOR = [0, 0, 0, 0]
|
|
2
|
-
export const MAX_TEXTURE_DIMENSION = 1024
|
|
3
|
-
export const EARTH_SUN_DISTANCE = 149600000000
|
|
4
|
-
export const EARTH_CIRCUMFERENCE = 40075016.686
|
|
5
|
-
export const SUN_RADIUS = 695508000
|
|
6
|
-
export const DEG2RAD = 0.017453292519943295
|
|
7
|
-
export const SLOPEFACTOR = 0.0333334
|
|
8
|
-
export const RGB_REGEX = /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/
|
|
9
|
-
export const HEX_REGEX = /(?:#)[0-9a-f]{8}|(?:#)[0-9a-f]{6}|(?:#)[0-9a-f]{4}|(?:#)[0-9a-f]{3}/ig
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
const defaultOptions = {
|
|
2
|
-
tileFormat: 'float32',
|
|
3
|
-
tileSize: 256,
|
|
4
|
-
colorScale: [],
|
|
5
|
-
sentinelValues: [],
|
|
6
|
-
transitions: false,
|
|
7
|
-
transitionTimeMs: 800,
|
|
8
|
-
debug: false,
|
|
9
|
-
extraPixelLayers: 0,
|
|
10
|
-
colorscaleMaxLength: 16,
|
|
11
|
-
sentinelMaxLength: 16,
|
|
12
|
-
|
|
13
|
-
// default TileLayer options
|
|
14
|
-
minZoom: 0,
|
|
15
|
-
maxZoom: 18,
|
|
16
|
-
subdomains: 'abc',
|
|
17
|
-
errorTileUrl: '',
|
|
18
|
-
zoomOffset: 0,
|
|
19
|
-
tms: false,
|
|
20
|
-
zoomReverse: false,
|
|
21
|
-
detectRetina: false,
|
|
22
|
-
crossOrigin: false,
|
|
23
|
-
|
|
24
|
-
// multi-analyze default options
|
|
25
|
-
glOperation: 'none',
|
|
26
|
-
multiLayers: 0,
|
|
27
|
-
operationUrlA: '',
|
|
28
|
-
operationUrlB: '',
|
|
29
|
-
operationUrlC: '',
|
|
30
|
-
operationUrlD: '',
|
|
31
|
-
operationUrlE: '',
|
|
32
|
-
operationUrlF: '',
|
|
33
|
-
filterLowA: 0,
|
|
34
|
-
filterHighA: 100000,
|
|
35
|
-
filterLowB: 0,
|
|
36
|
-
filterHighB: 100000,
|
|
37
|
-
filterLowC: 0,
|
|
38
|
-
filterHighC: 100000,
|
|
39
|
-
filterLowD: 0,
|
|
40
|
-
filterHighD: 100000,
|
|
41
|
-
filterLowE: 0,
|
|
42
|
-
filterHighE: 100000,
|
|
43
|
-
filterLowF: 0,
|
|
44
|
-
filterHighF: 100000,
|
|
45
|
-
multiplierA: 1,
|
|
46
|
-
multiplierB: 1,
|
|
47
|
-
multiplierC: 1,
|
|
48
|
-
multiplierD: 1,
|
|
49
|
-
multiplierE: 1,
|
|
50
|
-
multiplierF: 1,
|
|
51
|
-
|
|
52
|
-
// Hillshading default options
|
|
53
|
-
hillshadeType: 'none', // none, simple or pregen
|
|
54
|
-
hsSimpleZoomdelta: 0,
|
|
55
|
-
hsSimpleSlopescale: 3.0,
|
|
56
|
-
hsSimpleAzimuth: 315,
|
|
57
|
-
hsSimpleAltitude: 70,
|
|
58
|
-
hsAdvValueScale: 1.0,
|
|
59
|
-
hsAdvPixelScale: 'auto',
|
|
60
|
-
hsAdvSoftIterations: 10,
|
|
61
|
-
hsAdvAmbientIterations: 10,
|
|
62
|
-
hsAdvSunRadiusMultiplier: 100,
|
|
63
|
-
hsAdvFinalSoftMultiplier: 1.0,
|
|
64
|
-
hsAdvFinalAmbientMultiplier: 0.25,
|
|
65
|
-
hsAdvBaselayerUrl: '',
|
|
66
|
-
hsAdvSmoothInput: false,
|
|
67
|
-
hsAdvSmoothInputKernel: 3,
|
|
68
|
-
hsPregenUrl: '',
|
|
69
|
-
_hillshadeOptions: { hillshadeType: 'none' },
|
|
70
|
-
|
|
71
|
-
// Contours default options
|
|
72
|
-
contourType: 'none', // none, lines or illuminated
|
|
73
|
-
contourSmoothLines: false,
|
|
74
|
-
contourSmoothInput: false,
|
|
75
|
-
contourSmoothInputKernel: 7,
|
|
76
|
-
contourScaleFactor: 1,
|
|
77
|
-
contourInterval: 25,
|
|
78
|
-
contourIndexInterval: 100,
|
|
79
|
-
contourLineColor: '#000000',
|
|
80
|
-
contourIlluminatedHighlightColor: 'rgba(177,174,164,.5)',
|
|
81
|
-
contourIlluminatedShadowColor: '#5b5143',
|
|
82
|
-
contourIlluminatedShadowSize: 2, // px
|
|
83
|
-
contourLineWeight: 0.5, // px
|
|
84
|
-
contourLineIndexWeight: 2.0, // px
|
|
85
|
-
contourIndexLabels: false,
|
|
86
|
-
contourLabelFont: '12px Arial',
|
|
87
|
-
contourLabelDistance: 250,
|
|
88
|
-
contourHypso: false,
|
|
89
|
-
contourHypsoDomain: [0, 1000, 2000],
|
|
90
|
-
contourHypsoColors: ['#486341', '#e5d9c9', '#dddddd'],
|
|
91
|
-
contourBathy: false,
|
|
92
|
-
contourBathyDomain: [-2000, 0],
|
|
93
|
-
contourBathyColors: ['#315d9b', '#d5f2ff'],
|
|
94
|
-
contourBathyShadowColor: '#4e5c66',
|
|
95
|
-
contourBathyHighlightColor: 'rgba(224, 242, 255, .5)'
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export default defaultOptions
|