@google/earthengine 0.1.374 → 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 +21 -15
- package/build/ee_api_js.js +1 -1
- package/build/ee_api_js_debug.js +21 -15
- package/build/ee_api_js_npm.js +21 -15
- package/build/main.js +21 -15
- package/package.json +1 -1
- package/src/apiclient.js +1 -1
- package/src/examples/CloudMasking/Sentinel2ClearComposite.js +57 -0
package/.tmp/BUILD
CHANGED
|
@@ -665,10 +665,18 @@ Fileset(
|
|
|
665
665
|
srcdir = "//third_party/hosted_libraries/libs/earthengine/0.1.371:public",
|
|
666
666
|
destdir = "0.1.371",
|
|
667
667
|
),
|
|
668
|
+
FilesetEntry(
|
|
669
|
+
srcdir = "//third_party/hosted_libraries/libs/earthengine/0.1.373:public",
|
|
670
|
+
destdir = "0.1.373",
|
|
671
|
+
),
|
|
668
672
|
FilesetEntry(
|
|
669
673
|
srcdir = "//third_party/hosted_libraries/libs/earthengine/0.1.374:public",
|
|
670
674
|
destdir = "0.1.374",
|
|
671
675
|
),
|
|
676
|
+
FilesetEntry(
|
|
677
|
+
srcdir = "//third_party/hosted_libraries/libs/earthengine/0.1.375:public",
|
|
678
|
+
destdir = "0.1.375",
|
|
679
|
+
),
|
|
672
680
|
# NEXT RELEASE GOES HERE. DO NOT REMOVE OR CHANGE THIS LINE.
|
|
673
681
|
],
|
|
674
682
|
)
|
package/.tmp/METADATA
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Format: google3/devtools/metadata/metadata.proto (go/google3metadata)
|
|
2
2
|
|
|
3
|
-
name: "0.1.
|
|
3
|
+
name: "0.1.375"
|
|
4
4
|
description:
|
|
5
5
|
"Google Earth Engine is a cloud-based platform for planetary-scale "
|
|
6
6
|
"environmental data analysis. The Earth Engine JavaScript API allows "
|
|
@@ -8,16 +8,16 @@ description:
|
|
|
8
8
|
"applications."
|
|
9
9
|
|
|
10
10
|
third_party {
|
|
11
|
-
version: "v0.1.
|
|
11
|
+
version: "v0.1.375"
|
|
12
12
|
last_upgrade_date: {
|
|
13
13
|
year: 2023
|
|
14
14
|
month: 10
|
|
15
|
-
day:
|
|
15
|
+
day: 18
|
|
16
16
|
}
|
|
17
17
|
identifier {
|
|
18
18
|
type: "Git"
|
|
19
19
|
value: "https://github.com/google/earthengine-api.git"
|
|
20
|
-
version: "v0.1.
|
|
20
|
+
version: "v0.1.375"
|
|
21
21
|
primary_source: true
|
|
22
22
|
}
|
|
23
23
|
}
|
package/.tmp/VERSION_BUILD
CHANGED
|
@@ -9,7 +9,7 @@ load("//tools/build_defs/license:license.bzl", "license")
|
|
|
9
9
|
load("//tools/build_defs/build_test:build_test.bzl", "build_test")
|
|
10
10
|
|
|
11
11
|
package(
|
|
12
|
-
default_applicable_licenses = ["//third_party/hosted_libraries/libs/earthengine/0.1.
|
|
12
|
+
default_applicable_licenses = ["//third_party/hosted_libraries/libs/earthengine/0.1.375:license"],
|
|
13
13
|
default_visibility = [
|
|
14
14
|
"//third_party/hosted_libraries/libs/earthengine:__pkg__",
|
|
15
15
|
],
|
|
@@ -17,7 +17,7 @@ package(
|
|
|
17
17
|
|
|
18
18
|
license(
|
|
19
19
|
name = "license",
|
|
20
|
-
package_name = "0.1.
|
|
20
|
+
package_name = "0.1.375",
|
|
21
21
|
)
|
|
22
22
|
|
|
23
23
|
licenses(["notice"])
|
package/build/browser.js
CHANGED
|
@@ -17407,7 +17407,7 @@ goog.debug.entryPointRegistry.register(function(transformer) {
|
|
|
17407
17407
|
ee.apiclient = {};
|
|
17408
17408
|
var module$contents$ee$apiclient_apiclient = {};
|
|
17409
17409
|
ee.apiclient.VERSION = module$exports$ee$apiVersion.V1;
|
|
17410
|
-
ee.apiclient.API_CLIENT_VERSION = "0.1.
|
|
17410
|
+
ee.apiclient.API_CLIENT_VERSION = "0.1.375";
|
|
17411
17411
|
ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE;
|
|
17412
17412
|
ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService;
|
|
17413
17413
|
ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams;
|
|
@@ -17698,8 +17698,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m
|
|
|
17698
17698
|
var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded";
|
|
17699
17699
|
body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST"));
|
|
17700
17700
|
method = method || "POST";
|
|
17701
|
-
var headers = {"Content-Type":contentType}, version = "0.1.
|
|
17702
|
-
"0.1.
|
|
17701
|
+
var headers = {"Content-Type":contentType}, version = "0.1.375";
|
|
17702
|
+
"0.1.375" === version && (version = "latest");
|
|
17703
17703
|
headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version;
|
|
17704
17704
|
var authToken = module$contents$ee$apiclient_apiclient.getAuthToken();
|
|
17705
17705
|
if (null != authToken) {
|
|
@@ -25090,23 +25090,26 @@ function module$contents$safevalues$builders$script_builders_safeScriptWithArgs(
|
|
|
25090
25090
|
module$exports$safevalues$builders$script_builders.safeScriptWithArgs = module$contents$safevalues$builders$script_builders_safeScriptWithArgs;
|
|
25091
25091
|
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"};
|
|
25092
25092
|
function module$contents$safevalues$builders$style_builders_safeStyle(templateObj) {
|
|
25093
|
-
|
|
25094
|
-
|
|
25093
|
+
var rest = $jscomp.getRestArguments.apply(1, arguments);
|
|
25094
|
+
goog.DEBUG && module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, rest.length);
|
|
25095
|
+
for (var stringifiedStyle = templateObj[0], i = 0; i < templateObj.length - 1; i++) {
|
|
25096
|
+
stringifiedStyle += String(rest[i]) + templateObj[i + 1];
|
|
25097
|
+
}
|
|
25098
|
+
if (/[<>]/.test(stringifiedStyle)) {
|
|
25099
|
+
throw Error("Forbidden characters in style string: " + stringifiedStyle);
|
|
25100
|
+
}
|
|
25095
25101
|
if (goog.DEBUG) {
|
|
25096
|
-
if (0 ===
|
|
25097
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25098
|
-
}
|
|
25099
|
-
if (/[<>]/.test(style)) {
|
|
25100
|
-
throw Error("Forbidden characters in style string: " + style);
|
|
25102
|
+
if (0 === stringifiedStyle.length) {
|
|
25103
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25101
25104
|
}
|
|
25102
|
-
if (!/;$/.test(
|
|
25103
|
-
throw Error('Style string does not end with ";": ' +
|
|
25105
|
+
if (!/;$/.test(stringifiedStyle)) {
|
|
25106
|
+
throw Error('Style string does not end with ";": ' + stringifiedStyle);
|
|
25104
25107
|
}
|
|
25105
|
-
if (!/:/.test(
|
|
25106
|
-
throw Error('Style string should contain one or more ":": ' +
|
|
25108
|
+
if (!/:/.test(stringifiedStyle)) {
|
|
25109
|
+
throw Error('Style string should contain one or more ":": ' + stringifiedStyle);
|
|
25107
25110
|
}
|
|
25108
25111
|
}
|
|
25109
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25112
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25110
25113
|
}
|
|
25111
25114
|
module$exports$safevalues$builders$style_builders.safeStyle = module$contents$safevalues$builders$style_builders_safeStyle;
|
|
25112
25115
|
function module$contents$safevalues$builders$style_builders_concatStyles(styles) {
|
|
@@ -25209,6 +25212,9 @@ var module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES = [module$e
|
|
|
25209
25212
|
module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.FTP, module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.RELATIVE];
|
|
25210
25213
|
function module$contents$safevalues$builders$url_builders_trySanitizeUrl(url, allowedSchemes) {
|
|
25211
25214
|
allowedSchemes = void 0 === allowedSchemes ? module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES : allowedSchemes;
|
|
25215
|
+
if (module$contents$safevalues$internals$url_impl_isUrl(url)) {
|
|
25216
|
+
return url;
|
|
25217
|
+
}
|
|
25212
25218
|
for (var i = 0; i < allowedSchemes.length; ++i) {
|
|
25213
25219
|
var scheme = allowedSchemes[i];
|
|
25214
25220
|
if (module$contents$safevalues$builders$url_builders_isValidScheme(scheme) && scheme.isValid(url)) {
|
package/build/ee_api_js.js
CHANGED
|
@@ -441,7 +441,7 @@ Uc(p,f[m]))});return b?b(l):l};return this.callback?(uj(d,null,function(f,l){ret
|
|
|
441
441
|
vj.prototype.send=function(a,b){var c=[a.B+" "+a.path+" HTTP/1.1"];c.push("Content-Type: application/json; charset=utf-8");var d=yj();null!=d&&c.push("Authorization: "+d);a=a.body?JSON.stringify(a.body):"";return[c.join("\r\n")+"\r\n\r\n"+a,b]};
|
|
442
442
|
var zj=function(a,b,c){a=n(b.split("--"+a.split("; boundary=")[1]));for(b=a.next();!b.done;b=a.next())if(b=b.value.split("\r\n\r\n"),!(3>b.length)){var d=b[0].match(/\r\nContent-ID: <response-([^>]*)>/)[1],e=Number(b[1].match(/^HTTP\S*\s(\d+)\s/)[1]);c(d,e,b.slice(2).join("\r\n\r\n"))}},sj=function(){var a=Aj.replace(/\/api$/,"");return"window"in r&&!a.match(/^https?:\/\/content-/)?a.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/,"$1content-$2"):a},Cj=function(a,b,c){var d=[];a&&(d=d.concat(Bj));
|
|
443
443
|
b&&d.push("https://www.googleapis.com/auth/devstorage.read_write");a=d=d.concat(c);c=b=0;for(var e={};c<a.length;){var g=a[c++],f=t(g)?"o"+za(g):(typeof g).charAt(0)+g;Object.prototype.hasOwnProperty.call(e,f)||(e[f]=!0,a[b++]=g)}a.length=b;return d},Ij=function(a,b,c){Dj&&Ej&&Dj({client_id:String(Ej),immediate:!0,scope:Fj.join(" "),plugin_name:"earthengine"},function(d){if("immediate_failed"==d.error&&c)c();else if("window"in r)try{Gj(function(){try{r.gapi.client.setToken(d),Hj(a,b,d)}catch(e){b(e.toString())}})}catch(e){b(e.toString())}else Hj(a,
|
|
444
|
-
b,d)})},yj=function(){Jj&&0<=Date.now()-Jj&&Kj();return Lj},Kj=function(){Jj=Lj=null},pj=function(a,b,c,d){null!=a?Aj=a:Mj||(Aj="https://earthengine.googleapis.com/api");null!=b?Nj=b:Mj||(Nj="https://earthengine.googleapis.com");void 0!==c&&(Oj=c);oj=null!=d?d:oj||"earthengine-legacy";Mj=!0},uj=function(a,b,c,d,e,g,f){pj();var l=Pj,m="application/x-www-form-urlencoded";e&&(m="application/json",d&&d.startsWith("multipart")&&(m=d,d="POST"));d=d||"POST";m={"Content-Type":m};var p="0.1.
|
|
444
|
+
b,d)})},yj=function(){Jj&&0<=Date.now()-Jj&&Kj();return Lj},Kj=function(){Jj=Lj=null},pj=function(a,b,c,d){null!=a?Aj=a:Mj||(Aj="https://earthengine.googleapis.com/api");null!=b?Nj=b:Mj||(Nj="https://earthengine.googleapis.com");void 0!==c&&(Oj=c);oj=null!=d?d:oj||"earthengine-legacy";Mj=!0},uj=function(a,b,c,d,e,g,f){pj();var l=Pj,m="application/x-www-form-urlencoded";e&&(m="application/json",d&&d.startsWith("multipart")&&(m=d,d="POST"));d=d||"POST";m={"Content-Type":m};var p="0.1.375";"0.1.375"===
|
|
445
445
|
p&&(p="latest");m["x-goog-api-client"]="ee-js/"+p;p=yj();if(null!=p)m.Authorization=p;else if(c&&Dj&&Ej)return Ij(function(){Qj(l,function(){uj(a,b,c,d)})}),null;b=b?b.clone():new Kd;null!=Rj&&b.add("key",Rj);l&&(m["X-Earth-Engine-Computation-Profiling"]="1");oj&&"earthengine-legacy"!==oj&&(m["X-Goog-User-Project"]=oj);b=Sj(b,a);null!=Oj&&(m["X-XSRF-Token"]=Oj);null!=Tj&&(m["X-Earth-Engine-App-ID-Token"]=Tj);p=e||null;var v=b?b.toString():"";"POST"===d&&void 0===e?p=v:/^[\s\xa0]*$/.test(v)||(a+=-1!=
|
|
446
446
|
a.indexOf("?")?"&":"?",a+=v);e=a.startsWith("/")?Aj+a:a;if(c)return Uj.push(Vj(e,c,d,p,m,g,f)),Wj.nf(),null;v=function(Q,oa){this.setRequestHeader&&this.setRequestHeader(oa,Q)};var y=0;for(g=null!=g?g:5;;){var C=aj(Zi);C.open(d,e,!1);Db(m,v,C);C.send(p);if(429!=C.status||y>g)break;y++}return Xj(C.status,function(Q){try{return C.getResponseHeader(Q)}catch(oa){return null}},C.responseText,l,void 0,e,d,f)},Vj=function(a,b,c,d,e,g,f){var l=0,m={url:a,method:c,content:d,headers:e},p=Pj,v=null!=g?g:10;
|
|
447
447
|
m.callback=function(y){y=y.target;if(429==y.getStatus()&&l<v)return l++,setTimeout(function(){Uj.push(m);Wj.nf()},Math.min(12E4,1E3*Math.pow(2,l))),null;var C=Xj,Q=y.getStatus(),oa=u(y.getResponseHeader,y);try{var R=y.o?y.o.responseText:""}catch(Aa){Ui(y.aa,"Can not get responseText: "+Aa.message),R=""}return C(Q,oa,R,p,b,a,c,f)};return m},Qj=function(a,b){var c=Pj;try{Pj=a,b.call(void 0)}finally{Pj=c}},Xj=function(a,b,c,d,e,g,f,l){var m=d?b("X-Earth-Engine-Computation-Profile"):"";m&&d&&d(m);var p=
|
package/build/ee_api_js_debug.js
CHANGED
|
@@ -17407,7 +17407,7 @@ goog.debug.entryPointRegistry.register(function(transformer) {
|
|
|
17407
17407
|
ee.apiclient = {};
|
|
17408
17408
|
var module$contents$ee$apiclient_apiclient = {};
|
|
17409
17409
|
ee.apiclient.VERSION = module$exports$ee$apiVersion.V1;
|
|
17410
|
-
ee.apiclient.API_CLIENT_VERSION = "0.1.
|
|
17410
|
+
ee.apiclient.API_CLIENT_VERSION = "0.1.375";
|
|
17411
17411
|
ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE;
|
|
17412
17412
|
ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService;
|
|
17413
17413
|
ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams;
|
|
@@ -17698,8 +17698,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m
|
|
|
17698
17698
|
var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded";
|
|
17699
17699
|
body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST"));
|
|
17700
17700
|
method = method || "POST";
|
|
17701
|
-
var headers = {"Content-Type":contentType}, version = "0.1.
|
|
17702
|
-
"0.1.
|
|
17701
|
+
var headers = {"Content-Type":contentType}, version = "0.1.375";
|
|
17702
|
+
"0.1.375" === version && (version = "latest");
|
|
17703
17703
|
headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version;
|
|
17704
17704
|
var authToken = module$contents$ee$apiclient_apiclient.getAuthToken();
|
|
17705
17705
|
if (null != authToken) {
|
|
@@ -25090,23 +25090,26 @@ function module$contents$safevalues$builders$script_builders_safeScriptWithArgs(
|
|
|
25090
25090
|
module$exports$safevalues$builders$script_builders.safeScriptWithArgs = module$contents$safevalues$builders$script_builders_safeScriptWithArgs;
|
|
25091
25091
|
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"};
|
|
25092
25092
|
function module$contents$safevalues$builders$style_builders_safeStyle(templateObj) {
|
|
25093
|
-
|
|
25094
|
-
|
|
25093
|
+
var rest = $jscomp.getRestArguments.apply(1, arguments);
|
|
25094
|
+
goog.DEBUG && module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, rest.length);
|
|
25095
|
+
for (var stringifiedStyle = templateObj[0], i = 0; i < templateObj.length - 1; i++) {
|
|
25096
|
+
stringifiedStyle += String(rest[i]) + templateObj[i + 1];
|
|
25097
|
+
}
|
|
25098
|
+
if (/[<>]/.test(stringifiedStyle)) {
|
|
25099
|
+
throw Error("Forbidden characters in style string: " + stringifiedStyle);
|
|
25100
|
+
}
|
|
25095
25101
|
if (goog.DEBUG) {
|
|
25096
|
-
if (0 ===
|
|
25097
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25098
|
-
}
|
|
25099
|
-
if (/[<>]/.test(style)) {
|
|
25100
|
-
throw Error("Forbidden characters in style string: " + style);
|
|
25102
|
+
if (0 === stringifiedStyle.length) {
|
|
25103
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25101
25104
|
}
|
|
25102
|
-
if (!/;$/.test(
|
|
25103
|
-
throw Error('Style string does not end with ";": ' +
|
|
25105
|
+
if (!/;$/.test(stringifiedStyle)) {
|
|
25106
|
+
throw Error('Style string does not end with ";": ' + stringifiedStyle);
|
|
25104
25107
|
}
|
|
25105
|
-
if (!/:/.test(
|
|
25106
|
-
throw Error('Style string should contain one or more ":": ' +
|
|
25108
|
+
if (!/:/.test(stringifiedStyle)) {
|
|
25109
|
+
throw Error('Style string should contain one or more ":": ' + stringifiedStyle);
|
|
25107
25110
|
}
|
|
25108
25111
|
}
|
|
25109
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25112
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25110
25113
|
}
|
|
25111
25114
|
module$exports$safevalues$builders$style_builders.safeStyle = module$contents$safevalues$builders$style_builders_safeStyle;
|
|
25112
25115
|
function module$contents$safevalues$builders$style_builders_concatStyles(styles) {
|
|
@@ -25209,6 +25212,9 @@ var module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES = [module$e
|
|
|
25209
25212
|
module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.FTP, module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.RELATIVE];
|
|
25210
25213
|
function module$contents$safevalues$builders$url_builders_trySanitizeUrl(url, allowedSchemes) {
|
|
25211
25214
|
allowedSchemes = void 0 === allowedSchemes ? module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES : allowedSchemes;
|
|
25215
|
+
if (module$contents$safevalues$internals$url_impl_isUrl(url)) {
|
|
25216
|
+
return url;
|
|
25217
|
+
}
|
|
25212
25218
|
for (var i = 0; i < allowedSchemes.length; ++i) {
|
|
25213
25219
|
var scheme = allowedSchemes[i];
|
|
25214
25220
|
if (module$contents$safevalues$builders$url_builders_isValidScheme(scheme) && scheme.isValid(url)) {
|
package/build/ee_api_js_npm.js
CHANGED
|
@@ -17407,7 +17407,7 @@ goog.debug.entryPointRegistry.register(function(transformer) {
|
|
|
17407
17407
|
ee.apiclient = {};
|
|
17408
17408
|
var module$contents$ee$apiclient_apiclient = {};
|
|
17409
17409
|
ee.apiclient.VERSION = module$exports$ee$apiVersion.V1;
|
|
17410
|
-
ee.apiclient.API_CLIENT_VERSION = "0.1.
|
|
17410
|
+
ee.apiclient.API_CLIENT_VERSION = "0.1.375";
|
|
17411
17411
|
ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE;
|
|
17412
17412
|
ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService;
|
|
17413
17413
|
ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams;
|
|
@@ -17698,8 +17698,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m
|
|
|
17698
17698
|
var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded";
|
|
17699
17699
|
body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST"));
|
|
17700
17700
|
method = method || "POST";
|
|
17701
|
-
var headers = {"Content-Type":contentType}, version = "0.1.
|
|
17702
|
-
"0.1.
|
|
17701
|
+
var headers = {"Content-Type":contentType}, version = "0.1.375";
|
|
17702
|
+
"0.1.375" === version && (version = "latest");
|
|
17703
17703
|
headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version;
|
|
17704
17704
|
var authToken = module$contents$ee$apiclient_apiclient.getAuthToken();
|
|
17705
17705
|
if (null != authToken) {
|
|
@@ -25090,23 +25090,26 @@ function module$contents$safevalues$builders$script_builders_safeScriptWithArgs(
|
|
|
25090
25090
|
module$exports$safevalues$builders$script_builders.safeScriptWithArgs = module$contents$safevalues$builders$script_builders_safeScriptWithArgs;
|
|
25091
25091
|
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"};
|
|
25092
25092
|
function module$contents$safevalues$builders$style_builders_safeStyle(templateObj) {
|
|
25093
|
-
|
|
25094
|
-
|
|
25093
|
+
var rest = $jscomp.getRestArguments.apply(1, arguments);
|
|
25094
|
+
goog.DEBUG && module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, rest.length);
|
|
25095
|
+
for (var stringifiedStyle = templateObj[0], i = 0; i < templateObj.length - 1; i++) {
|
|
25096
|
+
stringifiedStyle += String(rest[i]) + templateObj[i + 1];
|
|
25097
|
+
}
|
|
25098
|
+
if (/[<>]/.test(stringifiedStyle)) {
|
|
25099
|
+
throw Error("Forbidden characters in style string: " + stringifiedStyle);
|
|
25100
|
+
}
|
|
25095
25101
|
if (goog.DEBUG) {
|
|
25096
|
-
if (0 ===
|
|
25097
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25098
|
-
}
|
|
25099
|
-
if (/[<>]/.test(style)) {
|
|
25100
|
-
throw Error("Forbidden characters in style string: " + style);
|
|
25102
|
+
if (0 === stringifiedStyle.length) {
|
|
25103
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25101
25104
|
}
|
|
25102
|
-
if (!/;$/.test(
|
|
25103
|
-
throw Error('Style string does not end with ";": ' +
|
|
25105
|
+
if (!/;$/.test(stringifiedStyle)) {
|
|
25106
|
+
throw Error('Style string does not end with ";": ' + stringifiedStyle);
|
|
25104
25107
|
}
|
|
25105
|
-
if (!/:/.test(
|
|
25106
|
-
throw Error('Style string should contain one or more ":": ' +
|
|
25108
|
+
if (!/:/.test(stringifiedStyle)) {
|
|
25109
|
+
throw Error('Style string should contain one or more ":": ' + stringifiedStyle);
|
|
25107
25110
|
}
|
|
25108
25111
|
}
|
|
25109
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25112
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25110
25113
|
}
|
|
25111
25114
|
module$exports$safevalues$builders$style_builders.safeStyle = module$contents$safevalues$builders$style_builders_safeStyle;
|
|
25112
25115
|
function module$contents$safevalues$builders$style_builders_concatStyles(styles) {
|
|
@@ -25209,6 +25212,9 @@ var module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES = [module$e
|
|
|
25209
25212
|
module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.FTP, module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.RELATIVE];
|
|
25210
25213
|
function module$contents$safevalues$builders$url_builders_trySanitizeUrl(url, allowedSchemes) {
|
|
25211
25214
|
allowedSchemes = void 0 === allowedSchemes ? module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES : allowedSchemes;
|
|
25215
|
+
if (module$contents$safevalues$internals$url_impl_isUrl(url)) {
|
|
25216
|
+
return url;
|
|
25217
|
+
}
|
|
25212
25218
|
for (var i = 0; i < allowedSchemes.length; ++i) {
|
|
25213
25219
|
var scheme = allowedSchemes[i];
|
|
25214
25220
|
if (module$contents$safevalues$builders$url_builders_isValidScheme(scheme) && scheme.isValid(url)) {
|
package/build/main.js
CHANGED
|
@@ -17409,7 +17409,7 @@ goog.debug.entryPointRegistry.register(function(transformer) {
|
|
|
17409
17409
|
ee.apiclient = {};
|
|
17410
17410
|
var module$contents$ee$apiclient_apiclient = {};
|
|
17411
17411
|
ee.apiclient.VERSION = module$exports$ee$apiVersion.V1;
|
|
17412
|
-
ee.apiclient.API_CLIENT_VERSION = "0.1.
|
|
17412
|
+
ee.apiclient.API_CLIENT_VERSION = "0.1.375";
|
|
17413
17413
|
ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE;
|
|
17414
17414
|
ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService;
|
|
17415
17415
|
ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams;
|
|
@@ -17700,8 +17700,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m
|
|
|
17700
17700
|
var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded";
|
|
17701
17701
|
body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST"));
|
|
17702
17702
|
method = method || "POST";
|
|
17703
|
-
var headers = {"Content-Type":contentType}, version = "0.1.
|
|
17704
|
-
"0.1.
|
|
17703
|
+
var headers = {"Content-Type":contentType}, version = "0.1.375";
|
|
17704
|
+
"0.1.375" === version && (version = "latest");
|
|
17705
17705
|
headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version;
|
|
17706
17706
|
var authToken = module$contents$ee$apiclient_apiclient.getAuthToken();
|
|
17707
17707
|
if (null != authToken) {
|
|
@@ -25092,23 +25092,26 @@ function module$contents$safevalues$builders$script_builders_safeScriptWithArgs(
|
|
|
25092
25092
|
module$exports$safevalues$builders$script_builders.safeScriptWithArgs = module$contents$safevalues$builders$script_builders_safeScriptWithArgs;
|
|
25093
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"};
|
|
25094
25094
|
function module$contents$safevalues$builders$style_builders_safeStyle(templateObj) {
|
|
25095
|
-
|
|
25096
|
-
|
|
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
|
+
}
|
|
25097
25103
|
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);
|
|
25104
|
+
if (0 === stringifiedStyle.length) {
|
|
25105
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25103
25106
|
}
|
|
25104
|
-
if (!/;$/.test(
|
|
25105
|
-
throw Error('Style string does not end with ";": ' +
|
|
25107
|
+
if (!/;$/.test(stringifiedStyle)) {
|
|
25108
|
+
throw Error('Style string does not end with ";": ' + stringifiedStyle);
|
|
25106
25109
|
}
|
|
25107
|
-
if (!/:/.test(
|
|
25108
|
-
throw Error('Style string should contain one or more ":": ' +
|
|
25110
|
+
if (!/:/.test(stringifiedStyle)) {
|
|
25111
|
+
throw Error('Style string should contain one or more ":": ' + stringifiedStyle);
|
|
25109
25112
|
}
|
|
25110
25113
|
}
|
|
25111
|
-
return module$contents$safevalues$internals$style_impl_createStyleInternal(
|
|
25114
|
+
return module$contents$safevalues$internals$style_impl_createStyleInternal(stringifiedStyle);
|
|
25112
25115
|
}
|
|
25113
25116
|
module$exports$safevalues$builders$style_builders.safeStyle = module$contents$safevalues$builders$style_builders_safeStyle;
|
|
25114
25117
|
function module$contents$safevalues$builders$style_builders_concatStyles(styles) {
|
|
@@ -25211,6 +25214,9 @@ var module$contents$safevalues$builders$url_builders_DEFAULT_SCHEMES = [module$e
|
|
|
25211
25214
|
module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.FTP, module$exports$safevalues$builders$url_builders.SanitizableUrlScheme.RELATIVE];
|
|
25212
25215
|
function module$contents$safevalues$builders$url_builders_trySanitizeUrl(url, allowedSchemes) {
|
|
25213
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
|
+
}
|
|
25214
25220
|
for (var i = 0; i < allowedSchemes.length; ++i) {
|
|
25215
25221
|
var scheme = allowedSchemes[i];
|
|
25216
25222
|
if (module$contents$safevalues$builders$url_builders_isValidScheme(scheme) && scheme.isValid(url)) {
|
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);
|