@google/earthengine 0.1.373 → 0.1.375
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/.tmp/BUILD +8 -0
- package/.tmp/METADATA +4 -4
- package/.tmp/VERSION_BUILD +2 -2
- package/build/browser.js +49 -44
- package/build/ee_api_js.js +170 -170
- package/build/ee_api_js_debug.js +49 -44
- package/build/ee_api_js_npm.js +49 -44
- package/build/main.js +49 -44
- package/package.json +1 -1
- package/src/apiclient.js +1 -1
- package/src/examples/CloudMasking/Sentinel2ClearComposite.js +57 -0
- package/src/imagecollection.js +9 -2
- package/src/terrain.js +0 -0
package/build/main.js
CHANGED
|
@@ -6065,7 +6065,7 @@ module$exports$eeapiclient$domain_object.strictDeserialize = function(type, raw)
|
|
|
6065
6065
|
};
|
|
6066
6066
|
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
6067
|
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$
|
|
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$m192531680$0 = {}; !$jscomp$key$key.done; $jscomp$loop$m192531680$0 = {mapMetadata:$jscomp$loop$m192531680$0.mapMetadata},
|
|
6069
6069
|
$jscomp$key$key = $jscomp$iter$19.next()) {
|
|
6070
6070
|
var key = $jscomp$key$key.value, value = valueGetter(key, source);
|
|
6071
6071
|
if (null != value) {
|
|
@@ -6078,11 +6078,11 @@ function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter,
|
|
|
6078
6078
|
} else if (objects.hasOwnProperty(key)) {
|
|
6079
6079
|
copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !1, !0, objects[key]);
|
|
6080
6080
|
} else if (objectMaps.hasOwnProperty(key)) {
|
|
6081
|
-
$jscomp$loop$
|
|
6081
|
+
$jscomp$loop$m192531680$0.mapMetadata = objectMaps[key], copy = $jscomp$loop$m192531680$0.mapMetadata.isPropertyArray ? value.map(function($jscomp$loop$m192531680$0) {
|
|
6082
6082
|
return function(v) {
|
|
6083
|
-
return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$
|
|
6083
|
+
return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$m192531680$0.mapMetadata, valueGetter, valueSetter, copyInstanciator);
|
|
6084
6084
|
};
|
|
6085
|
-
}($jscomp$loop$
|
|
6085
|
+
}($jscomp$loop$m192531680$0)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$m192531680$0.mapMetadata, valueGetter, valueSetter, copyInstanciator);
|
|
6086
6086
|
} else if (Array.isArray(value)) {
|
|
6087
6087
|
if (metadata.emptyArrayIsUnset && 0 === value.length) {
|
|
6088
6088
|
continue;
|
|
@@ -6128,39 +6128,39 @@ function module$contents$eeapiclient$domain_object_deepEquals(serializable1, ser
|
|
|
6128
6128
|
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
6129
|
return !1;
|
|
6130
6130
|
}
|
|
6131
|
-
for (var $jscomp$iter$21 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$21.next(), $jscomp$loop$
|
|
6131
|
+
for (var $jscomp$iter$21 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$21.next(), $jscomp$loop$m192531680$1 = {}; !$jscomp$key$key.done; $jscomp$loop$m192531680$1 = {value2$jscomp$7:$jscomp$loop$m192531680$1.value2$jscomp$7, mapMetadata$jscomp$2:$jscomp$loop$m192531680$1.mapMetadata$jscomp$2}, $jscomp$key$key = $jscomp$iter$21.next()) {
|
|
6132
6132
|
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
6133
|
if (has1 !== has2) {
|
|
6134
6134
|
return !1;
|
|
6135
6135
|
}
|
|
6136
6136
|
if (has1) {
|
|
6137
6137
|
var value1 = serializable1.Serializable$get(key);
|
|
6138
|
-
$jscomp$loop$
|
|
6138
|
+
$jscomp$loop$m192531680$1.value2$jscomp$7 = serializable2.Serializable$get(key);
|
|
6139
6139
|
if (arrays1.hasOwnProperty(key)) {
|
|
6140
|
-
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6140
|
+
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$1.value2$jscomp$7, !0, !0)) {
|
|
6141
6141
|
return !1;
|
|
6142
6142
|
}
|
|
6143
6143
|
} else if (objects1.hasOwnProperty(key)) {
|
|
6144
|
-
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6144
|
+
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$1.value2$jscomp$7, !1, !0)) {
|
|
6145
6145
|
return !1;
|
|
6146
6146
|
}
|
|
6147
6147
|
} else if (objectMaps1.hasOwnProperty(key)) {
|
|
6148
|
-
if ($jscomp$loop$
|
|
6149
|
-
if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$
|
|
6148
|
+
if ($jscomp$loop$m192531680$1.mapMetadata$jscomp$2 = objectMaps1[key], $jscomp$loop$m192531680$1.mapMetadata$jscomp$2.isPropertyArray) {
|
|
6149
|
+
if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$m192531680$1.value2$jscomp$7) || value1.some(function($jscomp$loop$m192531680$1) {
|
|
6150
6150
|
return function(v1, i) {
|
|
6151
|
-
return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$
|
|
6151
|
+
return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$m192531680$1.value2$jscomp$7[i], $jscomp$loop$m192531680$1.mapMetadata$jscomp$2);
|
|
6152
6152
|
};
|
|
6153
|
-
}($jscomp$loop$
|
|
6153
|
+
}($jscomp$loop$m192531680$1))) {
|
|
6154
6154
|
return !1;
|
|
6155
6155
|
}
|
|
6156
|
-
} else if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$
|
|
6156
|
+
} else if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$m192531680$1.value2$jscomp$7, $jscomp$loop$m192531680$1.mapMetadata$jscomp$2)) {
|
|
6157
6157
|
return !1;
|
|
6158
6158
|
}
|
|
6159
6159
|
} else if (Array.isArray(value1)) {
|
|
6160
|
-
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6160
|
+
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$1.value2$jscomp$7, !0, !1)) {
|
|
6161
6161
|
return !1;
|
|
6162
6162
|
}
|
|
6163
|
-
} else if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6163
|
+
} else if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$1.value2$jscomp$7, !1, !1)) {
|
|
6164
6164
|
return !1;
|
|
6165
6165
|
}
|
|
6166
6166
|
}
|
|
@@ -6878,7 +6878,6 @@ goog.html.SafeUrl.fromTrustedResourceUrl = function(trustedResourceUrl) {
|
|
|
6878
6878
|
return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.html.TrustedResourceUrl.unwrap(trustedResourceUrl));
|
|
6879
6879
|
};
|
|
6880
6880
|
goog.html.SAFE_URL_PATTERN_ = /^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;
|
|
6881
|
-
goog.html.SafeUrl.SAFE_URL_PATTERN = goog.html.SAFE_URL_PATTERN_;
|
|
6882
6881
|
goog.html.SafeUrl.trySanitize = function(url) {
|
|
6883
6882
|
if (url instanceof goog.html.SafeUrl) {
|
|
6884
6883
|
return url;
|
|
@@ -17410,7 +17409,7 @@ goog.debug.entryPointRegistry.register(function(transformer) {
|
|
|
17410
17409
|
ee.apiclient = {};
|
|
17411
17410
|
var module$contents$ee$apiclient_apiclient = {};
|
|
17412
17411
|
ee.apiclient.VERSION = module$exports$ee$apiVersion.V1;
|
|
17413
|
-
ee.apiclient.API_CLIENT_VERSION = "0.1.
|
|
17412
|
+
ee.apiclient.API_CLIENT_VERSION = "0.1.375";
|
|
17414
17413
|
ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE;
|
|
17415
17414
|
ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService;
|
|
17416
17415
|
ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams;
|
|
@@ -17701,8 +17700,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m
|
|
|
17701
17700
|
var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded";
|
|
17702
17701
|
body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST"));
|
|
17703
17702
|
method = method || "POST";
|
|
17704
|
-
var headers = {"Content-Type":contentType}, version = "0.1.
|
|
17705
|
-
"0.1.
|
|
17703
|
+
var headers = {"Content-Type":contentType}, version = "0.1.375";
|
|
17704
|
+
"0.1.375" === version && (version = "latest");
|
|
17706
17705
|
headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version;
|
|
17707
17706
|
var authToken = module$contents$ee$apiclient_apiclient.getAuthToken();
|
|
17708
17707
|
if (null != authToken) {
|
|
@@ -21802,9 +21801,9 @@ ee.ImageCollection.prototype.select = function(selectors, opt_names) {
|
|
|
21802
21801
|
};
|
|
21803
21802
|
goog.exportProperty(ee.ImageCollection.prototype, "select", ee.ImageCollection.prototype.select);
|
|
21804
21803
|
ee.ImageCollection.prototype.linkCollection = function(imageCollection, opt_linkedBands, opt_linkedProperties, opt_matchPropertyName) {
|
|
21805
|
-
var
|
|
21804
|
+
var args = ee.arguments.extractFromFunction(ee.ImageCollection.prototype.linkCollection, arguments);
|
|
21806
21805
|
return this.map(function(obj) {
|
|
21807
|
-
return ee.ApiFunction._call
|
|
21806
|
+
return ee.ApiFunction._call("Image.linkCollection", obj, args.imageCollection, args.linkedBands, args.linkedProperties, args.matchPropertyName);
|
|
21808
21807
|
});
|
|
21809
21808
|
};
|
|
21810
21809
|
goog.exportProperty(ee.ImageCollection.prototype, "linkCollection", ee.ImageCollection.prototype.linkCollection);
|
|
@@ -24337,8 +24336,8 @@ function module$contents$safevalues$internals$attribute_impl_unwrapAttributePref
|
|
|
24337
24336
|
throw Error(message);
|
|
24338
24337
|
}
|
|
24339
24338
|
module$exports$safevalues$internals$attribute_impl.unwrapAttributePrefix = module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix;
|
|
24340
|
-
var $jscomp$templatelit$
|
|
24341
|
-
["\\0"]), $jscomp$templatelit$
|
|
24339
|
+
var $jscomp$templatelit$1274514361$0 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$1274514361$1 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\0"]), $jscomp$templatelit$1274514361$2 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$1274514361$3 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), $jscomp$templatelit$1274514361$4 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$1274514361$5 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"],
|
|
24340
|
+
["\\0"]), $jscomp$templatelit$1274514361$6 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$1274514361$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"};
|
|
24342
24341
|
function module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, numExprs) {
|
|
24343
24342
|
if (!module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) || numExprs + 1 !== templateObj.length) {
|
|
24344
24343
|
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 ##############################");
|
|
@@ -24352,14 +24351,14 @@ function module$contents$safevalues$internals$string_literal_checkTranspiled(fn)
|
|
|
24352
24351
|
return -1 === fn.toString().indexOf("`");
|
|
24353
24352
|
}
|
|
24354
24353
|
var module$contents$safevalues$internals$string_literal_isTranspiled = module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24355
|
-
return tag($jscomp$templatelit$
|
|
24354
|
+
return tag($jscomp$templatelit$1274514361$0);
|
|
24356
24355
|
}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24357
|
-
return tag($jscomp$templatelit$
|
|
24356
|
+
return tag($jscomp$templatelit$1274514361$1);
|
|
24358
24357
|
}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24359
|
-
return tag($jscomp$templatelit$
|
|
24358
|
+
return tag($jscomp$templatelit$1274514361$2);
|
|
24360
24359
|
}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24361
|
-
return tag($jscomp$templatelit$
|
|
24362
|
-
}), module$contents$safevalues$internals$string_literal_frozenTSA = module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$
|
|
24360
|
+
return tag($jscomp$templatelit$1274514361$3);
|
|
24361
|
+
}), module$contents$safevalues$internals$string_literal_frozenTSA = module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$4) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$5) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$6) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$7);
|
|
24363
24362
|
function module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) {
|
|
24364
24363
|
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)) ?
|
|
24365
24364
|
!0 : !1;
|
|
@@ -24684,7 +24683,7 @@ function module$contents$safevalues$builders$html_sanitizer$sanitizer_table$sani
|
|
|
24684
24683
|
}
|
|
24685
24684
|
module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.isCustomElement = module$contents$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table_isCustomElement;
|
|
24686
24685
|
var module$exports$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table = {}, module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_module = module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_module || {id:"third_party/javascript/safevalues/builders/html_sanitizer/sanitizer_table/default_sanitizer_table.closure.js"},
|
|
24687
|
-
module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_ELEMENTS = "ARTICLE SECTION NAV ASIDE H1 H2 H3 H4 H5 H6 HEADER FOOTER ADDRESS P HR PRE BLOCKQUOTE OL UL LH LI DL DT DD FIGURE FIGCAPTION MAIN DIV EM STRONG SMALL S CITE Q DFN ABBR RUBY RB RT RTC RP DATA TIME CODE VAR SAMP KBD SUB SUP I B U MARK BDI BDO SPAN BR WBR INS DEL PICTURE PARAM TRACK MAP TABLE CAPTION COLGROUP COL TBODY THEAD TFOOT TR TD TH SELECT DATALIST OPTGROUP OPTION OUTPUT PROGRESS METER FIELDSET LEGEND DETAILS SUMMARY MENU DIALOG SLOT CANVAS FONT CENTER".split(" "),
|
|
24686
|
+
module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ALLOWED_ELEMENTS = "ARTICLE SECTION NAV ASIDE H1 H2 H3 H4 H5 H6 HEADER FOOTER ADDRESS P HR PRE BLOCKQUOTE OL UL LH LI DL DT DD FIGURE FIGCAPTION MAIN DIV EM STRONG SMALL S CITE Q DFN ABBR RUBY RB RT RTC RP DATA TIME CODE VAR SAMP KBD SUB SUP I B U MARK BDI BDO SPAN BR WBR INS DEL PICTURE PARAM TRACK MAP TABLE CAPTION COLGROUP COL TBODY THEAD TFOOT TR TD TH SELECT DATALIST OPTGROUP OPTION OUTPUT PROGRESS METER FIELDSET LEGEND DETAILS SUMMARY MENU DIALOG SLOT CANVAS FONT CENTER ACRONYM BASEFONT BIG DIR HGROUP STRIKE TT".split(" "),
|
|
24688
24687
|
module$contents$safevalues$builders$html_sanitizer$sanitizer_table$default_sanitizer_table_ELEMENT_POLICIES = [["A", new Map([["href", {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP_AND_SANITIZE_URL}]])], ["AREA", new Map([["href", {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP_AND_SANITIZE_URL}]])],
|
|
24689
24688
|
["LINK", new Map([["href", {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP_AND_SANITIZE_URL, conditions:new Map([["rel", new Set("alternate author bookmark canonical cite help icon license next prefetch dns-prefetch prerender preconnect preload prev search subresource".split(" "))]])}]])], ["SOURCE", new Map([["src", {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP}]])],
|
|
24690
24689
|
["IMG", new Map([["src", {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP}]])], ["VIDEO", new Map([["src", {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP}]])], ["AUDIO", new Map([["src", {policyAction:module$exports$safevalues$builders$html_sanitizer$sanitizer_table$sanitizer_table.AttributePolicyAction.KEEP}]])]],
|
|
@@ -24822,7 +24821,7 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm
|
|
|
24822
24821
|
return !0;
|
|
24823
24822
|
}
|
|
24824
24823
|
for (var $jscomp$iter$44 = $jscomp.makeIterator(conditions), $jscomp$key$ = $jscomp$iter$44.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$44.next()) {
|
|
24825
|
-
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$
|
|
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$tmpm1803429925$0 = void 0, value = null == ($jscomp$optchain$tmpm1803429925$0 = attrs.getNamedItem(attrName__tsickle_destructured_1)) ? void 0 : $jscomp$optchain$tmpm1803429925$0.value;
|
|
24826
24825
|
if (value && !expectedValues.has(value)) {
|
|
24827
24826
|
return !1;
|
|
24828
24827
|
}
|
|
@@ -25093,23 +25092,26 @@ function module$contents$safevalues$builders$script_builders_safeScriptWithArgs(
|
|
|
25093
25092
|
module$exports$safevalues$builders$script_builders.safeScriptWithArgs = module$contents$safevalues$builders$script_builders_safeScriptWithArgs;
|
|
25094
25093
|
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"};
|
|
25095
25094
|
function module$contents$safevalues$builders$style_builders_safeStyle(templateObj) {
|
|
25096
|
-
|
|
25097
|
-
|
|
25095
|
+
var rest = $jscomp.getRestArguments.apply(1, arguments);
|
|
25096
|
+
goog.DEBUG && module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, rest.length);
|
|
25097
|
+
for (var stringifiedStyle = templateObj[0], i = 0; i < templateObj.length - 1; i++) {
|
|
25098
|
+
stringifiedStyle += String(rest[i]) + templateObj[i + 1];
|
|
25099
|
+
}
|
|
25100
|
+
if (/[<>]/.test(stringifiedStyle)) {
|
|
25101
|
+
throw Error("Forbidden characters in style string: " + stringifiedStyle);
|
|
25102
|
+
}
|
|
25098
25103
|
if (goog.DEBUG) {
|
|
25099
|
-
if (0 ===
|
|
25100
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25101
|
-
}
|
|
25102
|
-
if (/[<>]/.test(style)) {
|
|
25103
|
-
throw Error("Forbidden characters in style string: " + style);
|
|
25104
|
+
if (0 === stringifiedStyle.length) {
|
|
25105
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25104
25106
|
}
|
|
25105
|
-
if (!/;$/.test(
|
|
25106
|
-
throw Error('Style string does not end with ";": ' +
|
|
25107
|
+
if (!/;$/.test(stringifiedStyle)) {
|
|
25108
|
+
throw Error('Style string does not end with ";": ' + stringifiedStyle);
|
|
25107
25109
|
}
|
|
25108
|
-
if (!/:/.test(
|
|
25109
|
-
throw Error('Style string should contain one or more ":": ' +
|
|
25110
|
+
if (!/:/.test(stringifiedStyle)) {
|
|
25111
|
+
throw Error('Style string should contain one or more ":": ' + stringifiedStyle);
|
|
25110
25112
|
}
|
|
25111
25113
|
}
|
|
25112
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25114
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25113
25115
|
}
|
|
25114
25116
|
module$exports$safevalues$builders$style_builders.safeStyle = module$contents$safevalues$builders$style_builders_safeStyle;
|
|
25115
25117
|
function module$contents$safevalues$builders$style_builders_concatStyles(styles) {
|
|
@@ -25212,6 +25214,9 @@ var module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES = [module$e
|
|
|
25212
25214
|
module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.FTP, module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.RELATIVE];
|
|
25213
25215
|
function module$contents$safevalues$builders$url_builders_trySanitizeUrl(url, allowedSchemes) {
|
|
25214
25216
|
allowedSchemes = void 0 === allowedSchemes ? module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES : allowedSchemes;
|
|
25217
|
+
if (module$contents$safevalues$internals$url_impl_isUrl(url)) {
|
|
25218
|
+
return url;
|
|
25219
|
+
}
|
|
25215
25220
|
for (var i = 0; i < allowedSchemes.length; ++i) {
|
|
25216
25221
|
var scheme = allowedSchemes[i];
|
|
25217
25222
|
if (module$contents$safevalues$builders$url_builders_isValidScheme(scheme) && scheme.isValid(url)) {
|
|
@@ -25314,12 +25319,12 @@ function module$contents$safevalues$reporting$reporting_isChangedBySanitizing(s,
|
|
|
25314
25319
|
}
|
|
25315
25320
|
try {
|
|
25316
25321
|
module$contents$safevalues$builders$html_sanitizer$html_sanitizer_lenientlySanitizeHtmlAssertUnchanged(s);
|
|
25317
|
-
} catch ($jscomp$unused$catch$
|
|
25322
|
+
} catch ($jscomp$unused$catch$442189172$0) {
|
|
25318
25323
|
return module$contents$safevalues$reporting$reporting_reportLegacyConversion(options, module$contents$safevalues$reporting$reporting_ReportingType.HTML_CHANGED_BY_RELAXED_SANITIZING), !0;
|
|
25319
25324
|
}
|
|
25320
25325
|
try {
|
|
25321
25326
|
module$contents$safevalues$builders$html_sanitizer$html_sanitizer_sanitizeHtmlAssertUnchanged(s);
|
|
25322
|
-
} catch ($jscomp$unused$catch$
|
|
25327
|
+
} catch ($jscomp$unused$catch$442189172$1) {
|
|
25323
25328
|
return module$contents$safevalues$reporting$reporting_reportLegacyConversion(options, module$contents$safevalues$reporting$reporting_ReportingType.HTML_CHANGED_BY_SANITIZING), !0;
|
|
25324
25329
|
}
|
|
25325
25330
|
return !1;
|
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.375';
|
|
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);
|
package/src/imagecollection.js
CHANGED
|
@@ -359,11 +359,18 @@ ee.ImageCollection.prototype.select = function(selectors, opt_names) {
|
|
|
359
359
|
ee.ImageCollection.prototype.linkCollection = function(
|
|
360
360
|
imageCollection, opt_linkedBands, opt_linkedProperties,
|
|
361
361
|
opt_matchPropertyName) {
|
|
362
|
-
|
|
362
|
+
let args = ee.arguments.extractFromFunction(
|
|
363
|
+
ee.ImageCollection.prototype.linkCollection, arguments);
|
|
363
364
|
return /** @type {!ee.ImageCollection} */ (this.map(function(obj) {
|
|
364
365
|
let img = /** @type {!ee.Image} */ (obj);
|
|
365
366
|
img = /** @type {!ee.Image} */ (
|
|
366
|
-
ee.ApiFunction._call(
|
|
367
|
+
ee.ApiFunction._call(
|
|
368
|
+
'Image.linkCollection',
|
|
369
|
+
img,
|
|
370
|
+
/** @type {!ee.ImageCollection} */ (args['imageCollection']),
|
|
371
|
+
/** @type {?Array<string>} */ (args['linkedBands']),
|
|
372
|
+
/** @type {?Array<string>} */ (args['linkedProperties']),
|
|
373
|
+
/** @type {?string} */ (args['matchPropertyName'])));
|
|
367
374
|
return img;
|
|
368
375
|
}));
|
|
369
376
|
};
|
package/src/terrain.js
CHANGED
|
File without changes
|