@google/earthengine 0.1.374 → 0.1.376
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/build/browser.js +54 -64
- package/build/ee_api_js.js +15 -14
- package/build/ee_api_js_debug.js +48 -58
- package/build/ee_api_js_npm.js +54 -64
- package/build/main.js +54 -64
- package/package.json +1 -1
- package/src/apiclient.js +1 -1
- package/src/examples/CloudMasking/Sentinel2ClearComposite.js +57 -0
- package/.tmp/BUILD +0 -679
- package/.tmp/METADATA +0 -23
- package/.tmp/VERSION_BUILD +0 -47
package/build/main.js
CHANGED
|
@@ -2977,8 +2977,7 @@ goog.flags = {};
|
|
|
2977
2977
|
var module$contents$goog$flags_STAGING = goog.readFlagInternalDoNotUseOrElse(1, goog.FLAGS_STAGING_DEFAULT);
|
|
2978
2978
|
goog.flags.USE_USER_AGENT_CLIENT_HINTS = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_user_agent_client_hints__enable : goog.readFlagInternalDoNotUseOrElse(610401301, !1);
|
|
2979
2979
|
goog.flags.ASYNC_THROW_ON_UNICODE_TO_BYTE = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__async_throw_on_unicode_to_byte__enable : goog.readFlagInternalDoNotUseOrElse(899588437, !1);
|
|
2980
|
-
goog.flags.CLIENT_ONLY_WIZ_ATTRIBUTE_SANITIZATION = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ?
|
|
2981
|
-
module$contents$goog$flags_STAGING);
|
|
2980
|
+
goog.flags.CLIENT_ONLY_WIZ_ATTRIBUTE_SANITIZATION = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__override_disable_toggles || !module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__client_only_wiz_attribute_sanitization__disable : goog.readFlagInternalDoNotUseOrElse(533565600, !0);
|
|
2982
2981
|
goog.flags.CLIENT_ONLY_WIZ_HOOK_CONTEXT_FIX = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__client_only_wiz_hook_context_fix__enable : goog.readFlagInternalDoNotUseOrElse(563486499, !1);
|
|
2983
2982
|
goog.flags.TESTONLY_DISABLED_FLAG = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__testonly_disabled_flag__enable : goog.readFlagInternalDoNotUseOrElse(2147483644, !1);
|
|
2984
2983
|
goog.flags.TESTONLY_DEBUG_FLAG = module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__use_toggles ? goog.DEBUG || module$exports$closure$flags$flags$2etoggles.TOGGLE_GoogFlags__testonly_debug_flag__enable : goog.readFlagInternalDoNotUseOrElse(2147483645, goog.DEBUG);
|
|
@@ -6065,7 +6064,7 @@ module$exports$eeapiclient$domain_object.strictDeserialize = function(type, raw)
|
|
|
6065
6064
|
};
|
|
6066
6065
|
var module$contents$eeapiclient$domain_object_CopyValueGetter, module$contents$eeapiclient$domain_object_CopyValueSetter, module$contents$eeapiclient$domain_object_CopyConstructor, module$contents$eeapiclient$domain_object_CopyInstanciator;
|
|
6067
6066
|
function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter, valueSetter, copyInstanciator, targetConstructor) {
|
|
6068
|
-
for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$iter$19 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$key = $jscomp$iter$19.next(), $jscomp$loop$
|
|
6067
|
+
for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$iter$19 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$key = $jscomp$iter$19.next(), $jscomp$loop$m1892927425$0 = {}; !$jscomp$key$key.done; $jscomp$loop$m1892927425$0 = {mapMetadata:$jscomp$loop$m1892927425$0.mapMetadata},
|
|
6069
6068
|
$jscomp$key$key = $jscomp$iter$19.next()) {
|
|
6070
6069
|
var key = $jscomp$key$key.value, value = valueGetter(key, source);
|
|
6071
6070
|
if (null != value) {
|
|
@@ -6078,11 +6077,11 @@ function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter,
|
|
|
6078
6077
|
} else if (objects.hasOwnProperty(key)) {
|
|
6079
6078
|
copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !1, !0, objects[key]);
|
|
6080
6079
|
} else if (objectMaps.hasOwnProperty(key)) {
|
|
6081
|
-
$jscomp$loop$
|
|
6080
|
+
$jscomp$loop$m1892927425$0.mapMetadata = objectMaps[key], copy = $jscomp$loop$m1892927425$0.mapMetadata.isPropertyArray ? value.map(function($jscomp$loop$m1892927425$0) {
|
|
6082
6081
|
return function(v) {
|
|
6083
|
-
return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$
|
|
6082
|
+
return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$m1892927425$0.mapMetadata, valueGetter, valueSetter, copyInstanciator);
|
|
6084
6083
|
};
|
|
6085
|
-
}($jscomp$loop$
|
|
6084
|
+
}($jscomp$loop$m1892927425$0)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$m1892927425$0.mapMetadata, valueGetter, valueSetter, copyInstanciator);
|
|
6086
6085
|
} else if (Array.isArray(value)) {
|
|
6087
6086
|
if (metadata.emptyArrayIsUnset && 0 === value.length) {
|
|
6088
6087
|
continue;
|
|
@@ -6128,39 +6127,39 @@ function module$contents$eeapiclient$domain_object_deepEquals(serializable1, ser
|
|
|
6128
6127
|
if (!(module$contents$eeapiclient$domain_object_sameKeys(keys1, metadata2.keys || []) && module$contents$eeapiclient$domain_object_sameKeys(arrays1, arrays2) && module$contents$eeapiclient$domain_object_sameKeys(objects1, objects2) && module$contents$eeapiclient$domain_object_sameKeys(objectMaps1, objectMaps2))) {
|
|
6129
6128
|
return !1;
|
|
6130
6129
|
}
|
|
6131
|
-
for (var $jscomp$iter$21 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$21.next(), $jscomp$loop$
|
|
6130
|
+
for (var $jscomp$iter$21 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$21.next(), $jscomp$loop$m1892927425$1 = {}; !$jscomp$key$key.done; $jscomp$loop$m1892927425$1 = {value2$jscomp$7:$jscomp$loop$m1892927425$1.value2$jscomp$7, mapMetadata$jscomp$2:$jscomp$loop$m1892927425$1.mapMetadata$jscomp$2}, $jscomp$key$key = $jscomp$iter$21.next()) {
|
|
6132
6131
|
var key = $jscomp$key$key.value, has1 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable1, key, metadata1), has2 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable2, key, metadata2);
|
|
6133
6132
|
if (has1 !== has2) {
|
|
6134
6133
|
return !1;
|
|
6135
6134
|
}
|
|
6136
6135
|
if (has1) {
|
|
6137
6136
|
var value1 = serializable1.Serializable$get(key);
|
|
6138
|
-
$jscomp$loop$
|
|
6137
|
+
$jscomp$loop$m1892927425$1.value2$jscomp$7 = serializable2.Serializable$get(key);
|
|
6139
6138
|
if (arrays1.hasOwnProperty(key)) {
|
|
6140
|
-
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6139
|
+
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m1892927425$1.value2$jscomp$7, !0, !0)) {
|
|
6141
6140
|
return !1;
|
|
6142
6141
|
}
|
|
6143
6142
|
} else if (objects1.hasOwnProperty(key)) {
|
|
6144
|
-
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6143
|
+
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m1892927425$1.value2$jscomp$7, !1, !0)) {
|
|
6145
6144
|
return !1;
|
|
6146
6145
|
}
|
|
6147
6146
|
} else if (objectMaps1.hasOwnProperty(key)) {
|
|
6148
|
-
if ($jscomp$loop$
|
|
6149
|
-
if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$
|
|
6147
|
+
if ($jscomp$loop$m1892927425$1.mapMetadata$jscomp$2 = objectMaps1[key], $jscomp$loop$m1892927425$1.mapMetadata$jscomp$2.isPropertyArray) {
|
|
6148
|
+
if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$m1892927425$1.value2$jscomp$7) || value1.some(function($jscomp$loop$m1892927425$1) {
|
|
6150
6149
|
return function(v1, i) {
|
|
6151
|
-
return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$
|
|
6150
|
+
return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$m1892927425$1.value2$jscomp$7[i], $jscomp$loop$m1892927425$1.mapMetadata$jscomp$2);
|
|
6152
6151
|
};
|
|
6153
|
-
}($jscomp$loop$
|
|
6152
|
+
}($jscomp$loop$m1892927425$1))) {
|
|
6154
6153
|
return !1;
|
|
6155
6154
|
}
|
|
6156
|
-
} else if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$
|
|
6155
|
+
} else if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$m1892927425$1.value2$jscomp$7, $jscomp$loop$m1892927425$1.mapMetadata$jscomp$2)) {
|
|
6157
6156
|
return !1;
|
|
6158
6157
|
}
|
|
6159
6158
|
} else if (Array.isArray(value1)) {
|
|
6160
|
-
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6159
|
+
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m1892927425$1.value2$jscomp$7, !0, !1)) {
|
|
6161
6160
|
return !1;
|
|
6162
6161
|
}
|
|
6163
|
-
} else if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6162
|
+
} else if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m1892927425$1.value2$jscomp$7, !1, !1)) {
|
|
6164
6163
|
return !1;
|
|
6165
6164
|
}
|
|
6166
6165
|
}
|
|
@@ -7095,21 +7094,6 @@ module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.createRule = function(se
|
|
|
7095
7094
|
var styleSheet = selector + "{" + module$contents$goog$html$SafeStyle_SafeStyle.unwrap(style).replace(/</g, "\\3C ") + "}";
|
|
7096
7095
|
return module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheet);
|
|
7097
7096
|
};
|
|
7098
|
-
module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.createRuleLegacy = function(selector, style) {
|
|
7099
|
-
if ((0,goog.string.internal.contains)(selector, "<")) {
|
|
7100
|
-
throw Error("Selector does not allow '<', got: " + selector);
|
|
7101
|
-
}
|
|
7102
|
-
var selectorToCheck = selector.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g, "");
|
|
7103
|
-
if (!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=\\^$|]+$/.test(selectorToCheck)) {
|
|
7104
|
-
throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=\\^$|] and strings, got: " + selector);
|
|
7105
|
-
}
|
|
7106
|
-
if (!module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.hasBalancedBrackets_(selectorToCheck)) {
|
|
7107
|
-
throw Error("() and [] in selector must be balanced, got: " + selector);
|
|
7108
|
-
}
|
|
7109
|
-
style instanceof module$contents$goog$html$SafeStyle_SafeStyle || (style = module$contents$goog$html$SafeStyle_SafeStyle.create(style));
|
|
7110
|
-
var styleSheet = selector + "{" + module$contents$goog$html$SafeStyle_SafeStyle.unwrap(style).replace(/</g, "\\3C ") + "}";
|
|
7111
|
-
return module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheet);
|
|
7112
|
-
};
|
|
7113
7097
|
module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.hasBalancedBrackets_ = function(s) {
|
|
7114
7098
|
for (var brackets = {"(":")", "[":"]"}, expectedBrackets = [], i = 0; i < s.length; i++) {
|
|
7115
7099
|
var ch = s[i];
|
|
@@ -17409,7 +17393,7 @@ goog.debug.entryPointRegistry.register(function(transformer) {
|
|
|
17409
17393
|
ee.apiclient = {};
|
|
17410
17394
|
var module$contents$ee$apiclient_apiclient = {};
|
|
17411
17395
|
ee.apiclient.VERSION = module$exports$ee$apiVersion.V1;
|
|
17412
|
-
ee.apiclient.API_CLIENT_VERSION = "0.1.
|
|
17396
|
+
ee.apiclient.API_CLIENT_VERSION = "0.1.376";
|
|
17413
17397
|
ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE;
|
|
17414
17398
|
ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService;
|
|
17415
17399
|
ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams;
|
|
@@ -17700,8 +17684,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m
|
|
|
17700
17684
|
var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded";
|
|
17701
17685
|
body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST"));
|
|
17702
17686
|
method = method || "POST";
|
|
17703
|
-
var headers = {"Content-Type":contentType}, version = "0.1.
|
|
17704
|
-
"0.1.
|
|
17687
|
+
var headers = {"Content-Type":contentType}, version = "0.1.376";
|
|
17688
|
+
"0.1.376" === version && (version = "latest");
|
|
17705
17689
|
headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version;
|
|
17706
17690
|
var authToken = module$contents$ee$apiclient_apiclient.getAuthToken();
|
|
17707
17691
|
if (null != authToken) {
|
|
@@ -24336,8 +24320,8 @@ function module$contents$safevalues$internals$attribute_impl_unwrapAttributePref
|
|
|
24336
24320
|
throw Error(message);
|
|
24337
24321
|
}
|
|
24338
24322
|
module$exports$safevalues$internals$attribute_impl.unwrapAttributePrefix = module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix;
|
|
24339
|
-
var $jscomp$templatelit$
|
|
24340
|
-
["\\0"]), $jscomp$templatelit$
|
|
24323
|
+
var $jscomp$templatelit$m425881384$0 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$m425881384$1 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\0"]), $jscomp$templatelit$m425881384$2 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$m425881384$3 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), $jscomp$templatelit$m425881384$4 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$m425881384$5 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"],
|
|
24324
|
+
["\\0"]), $jscomp$templatelit$m425881384$6 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$m425881384$7 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), module$contents$safevalues$internals$string_literal_module = module$contents$safevalues$internals$string_literal_module || {id:"third_party/javascript/safevalues/internals/string_literal.closure.js"};
|
|
24341
24325
|
function module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, numExprs) {
|
|
24342
24326
|
if (!module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) || numExprs + 1 !== templateObj.length) {
|
|
24343
24327
|
throw new TypeError("\n ############################## ERROR ##############################\n\n It looks like you are trying to call a template tag function (fn`...`)\n using the normal function syntax (fn(...)), which is not supported.\n\n The functions in the safevalues library are not designed to be called\n like normal functions, and doing so invalidates the security guarantees\n that safevalues provides.\n\n If you are stuck and not sure how to proceed, please reach out to us\n instead through:\n - go/ise-hardening-yaqs (preferred) // LINE-INTERNAL\n - g/ise-hardening // LINE-INTERNAL\n - https://github.com/google/safevalues/issues\n\n ############################## ERROR ##############################");
|
|
@@ -24351,14 +24335,14 @@ function module$contents$safevalues$internals$string_literal_checkTranspiled(fn)
|
|
|
24351
24335
|
return -1 === fn.toString().indexOf("`");
|
|
24352
24336
|
}
|
|
24353
24337
|
var module$contents$safevalues$internals$string_literal_isTranspiled = module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24354
|
-
return tag($jscomp$templatelit$
|
|
24338
|
+
return tag($jscomp$templatelit$m425881384$0);
|
|
24355
24339
|
}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24356
|
-
return tag($jscomp$templatelit$
|
|
24340
|
+
return tag($jscomp$templatelit$m425881384$1);
|
|
24357
24341
|
}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24358
|
-
return tag($jscomp$templatelit$
|
|
24342
|
+
return tag($jscomp$templatelit$m425881384$2);
|
|
24359
24343
|
}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24360
|
-
return tag($jscomp$templatelit$
|
|
24361
|
-
}), module$contents$safevalues$internals$string_literal_frozenTSA = module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$
|
|
24344
|
+
return tag($jscomp$templatelit$m425881384$3);
|
|
24345
|
+
}), module$contents$safevalues$internals$string_literal_frozenTSA = module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$4) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$5) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$6) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$m425881384$7);
|
|
24362
24346
|
function module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) {
|
|
24363
24347
|
return Array.isArray(templateObj) && Array.isArray(templateObj.raw) && templateObj.length === templateObj.raw.length && (module$contents$safevalues$internals$string_literal_isTranspiled || templateObj !== templateObj.raw) && (module$contents$safevalues$internals$string_literal_isTranspiled && !module$contents$safevalues$internals$string_literal_frozenTSA || module$contents$safevalues$internals$string_literal_checkFrozen(templateObj)) ?
|
|
24364
24348
|
!0 : !1;
|
|
@@ -24381,7 +24365,7 @@ function module$contents$safevalues$builders$attribute_builders_safeAttrPrefix(t
|
|
|
24381
24365
|
}
|
|
24382
24366
|
;var module$contents$safevalues$internals$pure_module = module$contents$safevalues$internals$pure_module || {id:"third_party/javascript/safevalues/internals/pure.closure.js"};
|
|
24383
24367
|
function module$contents$safevalues$internals$pure_pure(valueOf) {
|
|
24384
|
-
return valueOf();
|
|
24368
|
+
return {valueOf:valueOf}.valueOf();
|
|
24385
24369
|
}
|
|
24386
24370
|
;var module$exports$goog$html$internals = {};
|
|
24387
24371
|
module$exports$goog$html$internals.createSafeHtml = module$contents$goog$html$SafeHtml_SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse;
|
|
@@ -24821,7 +24805,7 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm
|
|
|
24821
24805
|
return !0;
|
|
24822
24806
|
}
|
|
24823
24807
|
for (var $jscomp$iter$44 = $jscomp.makeIterator(conditions), $jscomp$key$ = $jscomp$iter$44.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$44.next()) {
|
|
24824
|
-
var $jscomp$destructuring$var54 = $jscomp.makeIterator($jscomp$key$.value), attrName__tsickle_destructured_1 = $jscomp$destructuring$var54.next().value, expectedValues = $jscomp$destructuring$var54.next().value, $jscomp$optchain$
|
|
24808
|
+
var $jscomp$destructuring$var54 = $jscomp.makeIterator($jscomp$key$.value), attrName__tsickle_destructured_1 = $jscomp$destructuring$var54.next().value, expectedValues = $jscomp$destructuring$var54.next().value, $jscomp$optchain$tmpm1085474118$0 = void 0, value = null == ($jscomp$optchain$tmpm1085474118$0 = attrs.getNamedItem(attrName__tsickle_destructured_1)) ? void 0 : $jscomp$optchain$tmpm1085474118$0.value;
|
|
24825
24809
|
if (value && !expectedValues.has(value)) {
|
|
24826
24810
|
return !1;
|
|
24827
24811
|
}
|
|
@@ -25092,23 +25076,26 @@ function module$contents$safevalues$builders$script_builders_safeScriptWithArgs(
|
|
|
25092
25076
|
module$exports$safevalues$builders$script_builders.safeScriptWithArgs = module$contents$safevalues$builders$script_builders_safeScriptWithArgs;
|
|
25093
25077
|
var module$exports$safevalues$builders$style_builders = {}, module$contents$safevalues$builders$style_builders_module = module$contents$safevalues$builders$style_builders_module || {id:"third_party/javascript/safevalues/builders/style_builders.closure.js"};
|
|
25094
25078
|
function module$contents$safevalues$builders$style_builders_safeStyle(templateObj) {
|
|
25095
|
-
|
|
25096
|
-
|
|
25079
|
+
var rest = $jscomp.getRestArguments.apply(1, arguments);
|
|
25080
|
+
goog.DEBUG && module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, rest.length);
|
|
25081
|
+
for (var stringifiedStyle = templateObj[0], i = 0; i < templateObj.length - 1; i++) {
|
|
25082
|
+
stringifiedStyle += String(rest[i]) + templateObj[i + 1];
|
|
25083
|
+
}
|
|
25084
|
+
if (/[<>]/.test(stringifiedStyle)) {
|
|
25085
|
+
throw Error("Forbidden characters in style string: " + stringifiedStyle);
|
|
25086
|
+
}
|
|
25097
25087
|
if (goog.DEBUG) {
|
|
25098
|
-
if (0 ===
|
|
25099
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25100
|
-
}
|
|
25101
|
-
if (/[<>]/.test(style)) {
|
|
25102
|
-
throw Error("Forbidden characters in style string: " + style);
|
|
25088
|
+
if (0 === stringifiedStyle.length) {
|
|
25089
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25103
25090
|
}
|
|
25104
|
-
if (!/;$/.test(
|
|
25105
|
-
throw Error('Style string does not end with ";": ' +
|
|
25091
|
+
if (!/;$/.test(stringifiedStyle)) {
|
|
25092
|
+
throw Error('Style string does not end with ";": ' + stringifiedStyle);
|
|
25106
25093
|
}
|
|
25107
|
-
if (!/:/.test(
|
|
25108
|
-
throw Error('Style string should contain one or more ":": ' +
|
|
25094
|
+
if (!/:/.test(stringifiedStyle)) {
|
|
25095
|
+
throw Error('Style string should contain one or more ":": ' + stringifiedStyle);
|
|
25109
25096
|
}
|
|
25110
25097
|
}
|
|
25111
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25098
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25112
25099
|
}
|
|
25113
25100
|
module$exports$safevalues$builders$style_builders.safeStyle = module$contents$safevalues$builders$style_builders_safeStyle;
|
|
25114
25101
|
function module$contents$safevalues$builders$style_builders_concatStyles(styles) {
|
|
@@ -25211,6 +25198,9 @@ var module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES = [module$e
|
|
|
25211
25198
|
module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.FTP, module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.RELATIVE];
|
|
25212
25199
|
function module$contents$safevalues$builders$url_builders_trySanitizeUrl(url, allowedSchemes) {
|
|
25213
25200
|
allowedSchemes = void 0 === allowedSchemes ? module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES : allowedSchemes;
|
|
25201
|
+
if (module$contents$safevalues$internals$url_impl_isUrl(url)) {
|
|
25202
|
+
return url;
|
|
25203
|
+
}
|
|
25214
25204
|
for (var i = 0; i < allowedSchemes.length; ++i) {
|
|
25215
25205
|
var scheme = allowedSchemes[i];
|
|
25216
25206
|
if (module$contents$safevalues$builders$url_builders_isValidScheme(scheme) && scheme.isValid(url)) {
|
|
@@ -25313,12 +25303,12 @@ function module$contents$safevalues$reporting$reporting_isChangedBySanitizing(s,
|
|
|
25313
25303
|
}
|
|
25314
25304
|
try {
|
|
25315
25305
|
module$contents$safevalues$builders$html_sanitizer$html_sanitizer_lenientlySanitizeHtmlAssertUnchanged(s);
|
|
25316
|
-
} catch ($jscomp$unused$catch$
|
|
25306
|
+
} catch ($jscomp$unused$catch$696273141$0) {
|
|
25317
25307
|
return module$contents$safevalues$reporting$reporting_reportLegacyConversion(options, module$contents$safevalues$reporting$reporting_ReportingType.HTML_CHANGED_BY_RELAXED_SANITIZING), !0;
|
|
25318
25308
|
}
|
|
25319
25309
|
try {
|
|
25320
25310
|
module$contents$safevalues$builders$html_sanitizer$html_sanitizer_sanitizeHtmlAssertUnchanged(s);
|
|
25321
|
-
} catch ($jscomp$unused$catch$
|
|
25311
|
+
} catch ($jscomp$unused$catch$696273141$1) {
|
|
25322
25312
|
return module$contents$safevalues$reporting$reporting_reportLegacyConversion(options, module$contents$safevalues$reporting$reporting_ReportingType.HTML_CHANGED_BY_SANITIZING), !0;
|
|
25323
25313
|
}
|
|
25324
25314
|
return !1;
|
|
@@ -26415,12 +26405,12 @@ ee.data.Profiler.Format.prototype.toString = function() {
|
|
|
26415
26405
|
ee.data.Profiler.Format.TEXT = new ee.data.Profiler.Format("text");
|
|
26416
26406
|
ee.data.Profiler.Format.JSON = new ee.data.Profiler.Format("json");
|
|
26417
26407
|
(function() {
|
|
26418
|
-
var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction.lookup ee.ApiFunction._apply ee.ApiFunction._call ee.batch.Export.table.toDrive ee.batch.Export.table.toAsset ee.batch.Export.table.toFeatureView ee.batch.Export.table.toBigQuery ee.batch.Export.image.toCloudStorage ee.batch.Export.video.toCloudStorage ee.batch.Export.map.toCloudStorage ee.batch.Export.
|
|
26408
|
+
var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction.lookup ee.ApiFunction._apply ee.ApiFunction._call ee.batch.Export.table.toDrive ee.batch.Export.table.toAsset ee.batch.Export.table.toFeatureView ee.batch.Export.table.toBigQuery ee.batch.Export.image.toCloudStorage ee.batch.Export.video.toCloudStorage ee.batch.Export.map.toCloudStorage ee.batch.Export.video.toDrive ee.batch.Export.classifier.toAsset ee.batch.Export.image.toAsset ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.table.toCloudStorage ee.batch.Export.image.toDrive ee.Collection.prototype.filterBounds ee.Collection.prototype.limit ee.Collection.prototype.map ee.Collection.prototype.filter ee.Collection.prototype.sort ee.Collection.prototype.iterate ee.Collection.prototype.filterDate ee.Collection.prototype.filterMetadata ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.evaluate ee.data.getFeatureViewTilesKey ee.data.createAsset ee.data.getList ee.data.listAssets ee.data.authenticate ee.data.getAssetAcl ee.data.makeTableDownloadUrl ee.data.listFeatures ee.data.getWorkloadTag ee.data.createAssetHome ee.data.makeDownloadUrl ee.data.getThumbId ee.data.getAssetRootQuota ee.data.getTableDownloadId ee.data.getVideoThumbId ee.data.getFilmstripThumbId ee.data.startIngestion ee.data.makeThumbUrl ee.data.resetWorkloadTag ee.data.computeValue ee.data.authenticateViaPrivateKey ee.data.getAssetRoots ee.data.listImages ee.data.getInfo ee.data.setAssetProperties ee.data.listBuckets ee.data.getDownloadId ee.data.setAssetAcl ee.data.getTaskListWithLimit ee.data.deleteAsset ee.data.updateAsset ee.data.cancelOperation ee.data.listOperations ee.data.getTaskList ee.data.copyAsset ee.data.getAsset ee.data.setWorkloadTag ee.data.renameAsset ee.data.cancelTask ee.data.getMapId ee.data.newTaskId ee.data.createFolder ee.data.getOperation ee.data.startTableIngestion ee.data.authenticateViaPopup ee.data.setDefaultWorkloadTag ee.data.getTileUrl ee.data.startProcessing ee.data.updateTask ee.data.getTaskStatus ee.data.authenticateViaOauth ee.Date ee.Deserializer.fromJSON ee.Deserializer.fromCloudApiJSON ee.Deserializer.decodeCloudApi ee.Deserializer.decode ee.Dictionary ee.InitState ee.TILE_SIZE ee.reset ee.initialize ee.call ee.apply ee.Algorithms ee.Element.prototype.set ee.Encodable.SourceFrame ee.Feature ee.Feature.prototype.getMap ee.Feature.prototype.getInfo ee.FeatureCollection ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.getMap ee.FeatureCollection.prototype.select ee.Filter.lte ee.Filter.lt ee.Filter.and ee.Filter.or ee.Filter.gte ee.Filter.date ee.Filter.inList ee.Filter ee.Filter.prototype.not ee.Filter.metadata ee.Filter.eq ee.Filter.neq ee.Filter.bounds ee.Filter.gt ee.Function.prototype.call ee.Function.prototype.apply ee.Geometry.Rectangle ee.Geometry.LineString ee.Geometry.Polygon ee.Geometry.prototype.toGeoJSON ee.Geometry.prototype.toGeoJSONString ee.Geometry.Point ee.Geometry.BBox ee.Geometry.LinearRing ee.Geometry.prototype.serialize ee.Geometry.MultiPolygon ee.Geometry ee.Geometry.MultiPoint ee.Geometry.MultiLineString ee.Image ee.Image.prototype.rename ee.Image.prototype.getMap ee.Image.prototype.getDownloadURL ee.Image.prototype.getInfo ee.Image.rgb ee.Image.prototype.getThumbURL ee.Image.prototype.expression ee.Image.prototype.getThumbId ee.Image.prototype.clip ee.Image.prototype.select ee.Image.cat ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.linkCollection ee.ImageCollection.prototype.select ee.ImageCollection.prototype.first ee.ImageCollection ee.ImageCollection.prototype.getFilmstripThumbURL ee.List ee.Number ee.Serializer.toReadableCloudApiJSON ee.Serializer.encode ee.Serializer.toJSON ee.Serializer.encodeCloudApiPretty ee.Serializer.encodeCloudApi ee.Serializer.toReadableJSON ee.Serializer.toCloudApiJSON ee.String ee.Terrain".split(" "),
|
|
26419
26409
|
orderedParamLists = [["name"], ["name", "namedArgs"], ["name", "var_args"], "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), ["collection", "opt_description", "opt_assetId", "opt_maxVertices"], "collection opt_description opt_assetId opt_maxFeaturesPerTile opt_thinningStrategy opt_thinningRanking opt_zOrderRanking".split(" "), "collection opt_description opt_table opt_overwrite opt_append opt_selectors opt_maxVertices".split(" "),
|
|
26420
26410
|
"image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), "image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris".split(" "),
|
|
26421
|
-
|
|
26422
|
-
"collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), "image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), ["geometry"], ["max", "opt_property", "opt_ascending"], ["algorithm", "opt_dropNulls"], ["
|
|
26423
|
-
["
|
|
26411
|
+
"collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), ["classifier", "opt_description", "opt_assetId"], "image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris".split(" "),
|
|
26412
|
+
"collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), "image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), ["geometry"], ["max", "opt_property", "opt_ascending"], ["algorithm", "opt_dropNulls"], ["filter"], ["property", "opt_ascending"], ["algorithm", "opt_first"],
|
|
26413
|
+
["start", "opt_end"], ["name", "operator", "value"], ["opt_callback"], ["func", "var_args"], ["legacy"], ["callback"], ["params", "opt_callback"], ["value", "opt_path", "opt_force", "opt_properties", "opt_callback"], ["params", "opt_callback"], ["parent", "opt_params", "opt_callback"], ["clientId", "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"], ["assetId", "opt_callback"], ["id"], ["asset", "params", "opt_callback"], [], ["requestedId", "opt_callback"], ["id"], ["params",
|
|
26424
26414
|
"opt_callback"], ["rootId", "opt_callback"], ["params", "opt_callback"], ["params", "opt_callback"], ["params", "opt_callback"], ["taskId", "request", "opt_callback"], ["id"], ["opt_resetDefault"], ["obj", "opt_callback"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes", "opt_suppressDefaultScopes"], ["opt_callback"], ["parent", "opt_params", "opt_callback"], ["id", "opt_callback"], ["assetId", "properties", "opt_callback"], ["project", "opt_callback"], ["params", "opt_callback"],
|
|
26425
26415
|
["assetId", "aclUpdate", "opt_callback"], ["opt_limit", "opt_callback"], ["assetId", "opt_callback"], ["assetId", "asset", "updateFields", "opt_callback"], ["operationName", "opt_callback"], ["opt_limit", "opt_callback"], ["opt_callback"], ["sourceId", "destinationId", "opt_overwrite", "opt_callback"], ["id", "opt_callback"], ["tag"], ["sourceId", "destinationId", "opt_callback"], ["taskId", "opt_callback"], ["params", "opt_callback"], ["opt_count", "opt_callback"], ["path", "opt_force", "opt_callback"],
|
|
26426
26416
|
["operationName", "opt_callback"], ["taskId", "request", "opt_callback"], ["opt_success", "opt_error"], ["tag"], ["id", "x", "y", "z"], ["taskId", "params", "opt_callback"], ["taskId", "action", "opt_callback"], ["taskId", "opt_callback"], "clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "), ["date", "opt_tz"], ["json"], ["json"], ["json"], ["json"], ["opt_dict"], [], [], [], "opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "),
|
|
@@ -26428,8 +26418,8 @@ ee.data.Profiler.Format.JSON = new ee.data.Profiler.Format("json");
|
|
|
26428
26418
|
"opt_rightField", "opt_leftValue"], ["opt_filter"], [], ["name", "operator", "value"], ["name", "value"], ["name", "value"], ["geometry", "opt_errorMargin"], ["name", "value"], ["var_args"], ["namedArgs"], ["coords", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], [], [], ["coords", "opt_proj"], ["west", "south", "east", "north"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"],
|
|
26429
26419
|
["legacy"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["opt_args"], ["var_args"], ["opt_visParams", "opt_callback"], ["params", "opt_callback"], ["opt_callback"], ["r", "g", "b"], ["params", "opt_callback"], ["expression", "opt_map"], ["params", "opt_callback"], ["geometry"], ["var_args"], ["var_args"], ["params", "opt_callback"], ["opt_visParams",
|
|
26430
26420
|
"opt_callback"], ["opt_callback"], ["imageCollection", "opt_linkedBands", "opt_linkedProperties", "opt_matchPropertyName"], ["selectors", "opt_names"], [], ["args"], ["params", "opt_callback"], ["list"], ["number"], ["obj"], ["obj", "opt_isCompound"], ["obj"], ["obj"], ["obj"], ["obj"], ["obj"], ["string"], []];
|
|
26431
|
-
[ee.ApiFunction.lookup, ee.ApiFunction._apply, ee.ApiFunction._call, module$contents$ee$batch_Export.table.toDrive, module$contents$ee$batch_Export.table.toAsset, module$contents$ee$batch_Export.table.toFeatureView, module$contents$ee$batch_Export.table.toBigQuery, module$contents$ee$batch_Export.image.toCloudStorage, module$contents$ee$batch_Export.video.toCloudStorage, module$contents$ee$batch_Export.map.toCloudStorage, module$contents$ee$batch_Export.
|
|
26432
|
-
module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.table.toCloudStorage, module$contents$ee$batch_Export.image.toDrive, ee.Collection.prototype.filterBounds, ee.Collection.prototype.limit, ee.Collection.prototype.map, ee.Collection.prototype.
|
|
26421
|
+
[ee.ApiFunction.lookup, ee.ApiFunction._apply, ee.ApiFunction._call, module$contents$ee$batch_Export.table.toDrive, module$contents$ee$batch_Export.table.toAsset, module$contents$ee$batch_Export.table.toFeatureView, module$contents$ee$batch_Export.table.toBigQuery, module$contents$ee$batch_Export.image.toCloudStorage, module$contents$ee$batch_Export.video.toCloudStorage, module$contents$ee$batch_Export.map.toCloudStorage, module$contents$ee$batch_Export.video.toDrive, module$contents$ee$batch_Export.classifier.toAsset,
|
|
26422
|
+
module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.table.toCloudStorage, module$contents$ee$batch_Export.image.toDrive, ee.Collection.prototype.filterBounds, ee.Collection.prototype.limit, ee.Collection.prototype.map, ee.Collection.prototype.filter, ee.Collection.prototype.sort, ee.Collection.prototype.iterate, ee.Collection.prototype.filterDate, ee.Collection.prototype.filterMetadata, ee.ComputedObject.prototype.getInfo,
|
|
26433
26423
|
ee.ComputedObject.prototype.aside, ee.ComputedObject.prototype.serialize, ee.ComputedObject.prototype.evaluate, ee.data.getFeatureViewTilesKey, ee.data.createAsset, ee.data.getList, ee.data.listAssets, ee.data.authenticate, ee.data.getAssetAcl, ee.data.makeTableDownloadUrl, ee.data.listFeatures, ee.data.getWorkloadTag, ee.data.createAssetHome, ee.data.makeDownloadUrl, ee.data.getThumbId, ee.data.getAssetRootQuota, ee.data.getTableDownloadId, ee.data.getVideoThumbId, ee.data.getFilmstripThumbId,
|
|
26434
26424
|
ee.data.startIngestion, ee.data.makeThumbUrl, ee.data.resetWorkloadTag, ee.data.computeValue, ee.data.authenticateViaPrivateKey, ee.data.getAssetRoots, ee.data.listImages, ee.data.getInfo, ee.data.setAssetProperties, ee.data.listBuckets, ee.data.getDownloadId, ee.data.setAssetAcl, ee.data.getTaskListWithLimit, ee.data.deleteAsset, ee.data.updateAsset, ee.data.cancelOperation, ee.data.listOperations, ee.data.getTaskList, ee.data.copyAsset, ee.data.getAsset, ee.data.setWorkloadTag, ee.data.renameAsset,
|
|
26435
26425
|
ee.data.cancelTask, ee.data.getMapId, ee.data.newTaskId, ee.data.createFolder, ee.data.getOperation, ee.data.startTableIngestion, ee.data.authenticateViaPopup, ee.data.setDefaultWorkloadTag, ee.data.getTileUrl, ee.data.startProcessing, ee.data.updateTask, ee.data.getTaskStatus, ee.data.authenticateViaOauth, ee.Date, ee.Deserializer.fromJSON, ee.Deserializer.fromCloudApiJSON, ee.Deserializer.decodeCloudApi, ee.Deserializer.decode, ee.Dictionary, ee.InitState, ee.TILE_SIZE, ee.reset, ee.initialize,
|
package/package.json
CHANGED
package/src/apiclient.js
CHANGED
|
@@ -25,7 +25,7 @@ const {PromiseRequestService} = goog.require('eeapiclient.promise_request_servic
|
|
|
25
25
|
/** @namespace */
|
|
26
26
|
const apiclient = {};
|
|
27
27
|
|
|
28
|
-
const API_CLIENT_VERSION = '0.1.
|
|
28
|
+
const API_CLIENT_VERSION = '0.1.376';
|
|
29
29
|
|
|
30
30
|
exports.VERSION = apiVersion.VERSION;
|
|
31
31
|
exports.API_CLIENT_VERSION = API_CLIENT_VERSION;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// This example demonstrates how to use Cloud Score+ QA bands to
|
|
2
|
+
// create a clear Sentinel-2 median composite.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
// Region of interest.
|
|
7
|
+
var roi = ee.Geometry.Rectangle([-124.8697, 35.5806, -119.9917, 39.9554]);
|
|
8
|
+
|
|
9
|
+
// Harmonized Sentinel-2 Level 2A collection.
|
|
10
|
+
var s2 = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED');
|
|
11
|
+
|
|
12
|
+
// Cloud Score+ image collection. Note Cloud Score+ is produced
|
|
13
|
+
// from Sentinel-2 Level 1C data and can be applied to either L1C
|
|
14
|
+
// or L2A collections.
|
|
15
|
+
var csPlus = ee.ImageCollection('GOOGLE/CLOUD_SCORE_PLUS/V1/S2_HARMONIZED');
|
|
16
|
+
|
|
17
|
+
// Get list of Sentinel-2 bands.
|
|
18
|
+
var csPlusBands = csPlus.first().bandNames();
|
|
19
|
+
|
|
20
|
+
// Link S2 and CS+ results.
|
|
21
|
+
var linkedCollection = s2.linkCollection(csPlus, csPlusBands);
|
|
22
|
+
// Date range for median composite.
|
|
23
|
+
var dateStart = '2023-03-01';
|
|
24
|
+
var dateEnd = '2023-09-01';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Masks pixels with low CS+ QA scores.
|
|
28
|
+
* @param {ee.Image} image Sentinel-2 image
|
|
29
|
+
* @return {ee.Image} masked Sentinel-2 image
|
|
30
|
+
*/
|
|
31
|
+
function maskLowQA(image) {
|
|
32
|
+
// CS+ QA band to use for masking. Options are 'cs' and 'cs_cdf'.
|
|
33
|
+
var qaBand = 'cs';
|
|
34
|
+
|
|
35
|
+
// Adjustable threshold for converting CS+ QA to a binary mask.
|
|
36
|
+
// Higher thresholds will mask out partial occlusions like thin clouds, haze &
|
|
37
|
+
// cirrus shadows. Lower thresholds will be more permissive of these
|
|
38
|
+
// occlusions.
|
|
39
|
+
var clearThreshold = 0.60;
|
|
40
|
+
var mask = image.select(qaBand).gte(clearThreshold);
|
|
41
|
+
|
|
42
|
+
return image.updateMask(mask);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
// Filter collection, mask pixels with low QA scores, and
|
|
47
|
+
// generate median composite.
|
|
48
|
+
var composite = linkedCollection.filterBounds(roi)
|
|
49
|
+
.filterDate(dateStart, dateEnd)
|
|
50
|
+
.map(maskLowQA)
|
|
51
|
+
.median();
|
|
52
|
+
|
|
53
|
+
// Sentinel-2 visualization parameters.
|
|
54
|
+
var s2Viz = {bands: ['B4', 'B3', 'B2'], min: 0, max: 3000};
|
|
55
|
+
|
|
56
|
+
Map.addLayer(composite, s2Viz, 'median composite');
|
|
57
|
+
Map.centerObject(roi, 11);
|