@google/earthengine 0.1.378 → 0.1.381

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/METADATA DELETED
@@ -1,23 +0,0 @@
1
- # Format: google3/devtools/metadata/metadata.proto (go/google3metadata)
2
-
3
- name: "0.1.378"
4
- description:
5
- "Google Earth Engine is a cloud-based platform for planetary-scale "
6
- "environmental data analysis. The Earth Engine JavaScript API allows "
7
- "developers to make requests to the Earth Engine servers from their own"
8
- "applications."
9
-
10
- third_party {
11
- version: "v0.1.378"
12
- last_upgrade_date: {
13
- year: 2023
14
- month: 11
15
- day: 8
16
- }
17
- identifier {
18
- type: "Git"
19
- value: "https://github.com/google/earthengine-api.git"
20
- version: "v0.1.378"
21
- primary_source: true
22
- }
23
- }
@@ -1,47 +0,0 @@
1
- # Description:
2
- # CDN files for Earth Engine JavaScript API.
3
- # See https://earthengine.google.com
4
- #
5
- # WARNING:
6
- # Do not copy from these files or link these files into google3.
7
-
8
- load("//tools/build_defs/license:license.bzl", "license")
9
- load("//tools/build_defs/build_test:build_test.bzl", "build_test")
10
-
11
- package(
12
- default_applicable_licenses = ["//third_party/hosted_libraries/libs/earthengine/0.1.378:license"],
13
- default_visibility = [
14
- "//third_party/hosted_libraries/libs/earthengine:__pkg__",
15
- ],
16
- )
17
-
18
- license(
19
- name = "license",
20
- package_name = "0.1.378",
21
- )
22
-
23
- licenses(["notice"])
24
-
25
- exports_files(["LICENSE"])
26
-
27
- Fileset(
28
- name = "public",
29
- out = "public_out",
30
- entries = [
31
- FilesetEntry(
32
- files = glob(
33
- ["**/*"],
34
- exclude = [
35
- "**/BUILD",
36
- "**/METADATA",
37
- "**/OWNERS",
38
- ],
39
- ),
40
- ),
41
- ],
42
- )
43
-
44
- build_test(
45
- name = "public_test",
46
- targets = [":public"],
47
- )
@@ -1,58 +0,0 @@
1
- // This example demonstrates how to use Cloud Score+ QA bands to generate and
2
- // display a collection of monthly clear median composites.
3
- //
4
-
5
- // Region of interest.
6
- var roi = ee.Geometry.Rectangle([-120.3388, 37.4074, -119.2732, 38.1012]);
7
-
8
- // Cloud Score+ image collection. Note Cloud Score+ is produced
9
- // from Sentinel-2 Level 1C data and can be applied to either L1C
10
- // or L2A collections.
11
- var csPlus = ee.ImageCollection('GOOGLE/CLOUD_SCORE_PLUS/V1/S2_HARMONIZED');
12
-
13
- // Harmonized Sentinel-2 Level 2A collection.
14
- var s2 = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED');
15
-
16
- // Link S2 and CS+ results.
17
- var linkedCollection =
18
- s2.linkCollection(csPlus, ['cs', 'cs_cdf']).filterBounds(roi);
19
-
20
- // Year to generate composites for.
21
- var year = 2022;
22
- var months = ee.List.sequence(1, 12);
23
-
24
- // Masks pixels with low CS+ QA scores.
25
- function maskLowQA(image) {
26
- // CS+ QA band to use for masking. Options are 'cs' and 'cs_cdf'.
27
- var qaBand = 'cs';
28
-
29
- // Adjustable threshold for converting CS+ QA to a binary mask.
30
- // Higher thresholds will mask out partial occlusions like thin clouds, haze &
31
- // cirrus shadows. Lower thresholds will be more permissive of these
32
- // occlusions.
33
- var clearThreshold = 0.60;
34
- var mask = image.select(qaBand).gte(clearThreshold);
35
-
36
- return image.updateMask(mask);
37
- }
38
-
39
- // Generate a collection of monthly median composites.
40
- var composites = ee.ImageCollection(months.map(function(month) {
41
- return linkedCollection.filter(ee.Filter.calendarRange(month, month, 'month'))
42
- .map(maskLowQA)
43
- .map(function(image) {
44
- return image.toFloat();
45
- })
46
- .median()
47
- .set('month', month);
48
- }));
49
-
50
- // Sentinel-2 visualization parameters.
51
- var s2Viz = {bands: ['B4', 'B3', 'B2'], min: 0, max: 3000};
52
-
53
- for (var month = 1; month <= 12; month++) {
54
- var composite = composites.filter(ee.Filter.eq('month', month));
55
- Map.addLayer(composite, s2Viz, 'composite ' + month);
56
- }
57
-
58
- Map.centerObject(roi, 12);