earthengine-api 1.5.13rc0__py3-none-any.whl → 1.7.4__py3-none-any.whl
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.
Potentially problematic release.
This version of earthengine-api might be problematic. Click here for more details.
- {earthengine_api-1.5.13rc0.dist-info → earthengine_api-1.7.4.dist-info}/METADATA +3 -3
- earthengine_api-1.7.4.dist-info/RECORD +109 -0
- {earthengine_api-1.5.13rc0.dist-info → earthengine_api-1.7.4.dist-info}/WHEEL +1 -1
- ee/__init__.py +29 -28
- ee/_arg_types.py +7 -6
- ee/_cloud_api_utils.py +95 -78
- ee/_helpers.py +17 -13
- ee/_state.py +105 -0
- ee/_utils.py +2 -1
- ee/apifunction.py +21 -19
- ee/apitestcase.py +33 -38
- ee/batch.py +87 -77
- ee/blob.py +10 -12
- ee/classifier.py +57 -59
- ee/cli/commands.py +178 -114
- ee/cli/eecli.py +1 -1
- ee/cli/utils.py +61 -42
- ee/clusterer.py +39 -41
- ee/collection.py +64 -54
- ee/computedobject.py +19 -16
- ee/confusionmatrix.py +9 -9
- ee/customfunction.py +13 -12
- ee/data.py +220 -322
- ee/daterange.py +10 -10
- ee/deprecation.py +21 -13
- ee/deserializer.py +25 -20
- ee/dictionary.py +11 -11
- ee/ee_array.py +22 -20
- ee/ee_date.py +23 -23
- ee/ee_list.py +15 -16
- ee/ee_number.py +11 -21
- ee/ee_string.py +24 -32
- ee/ee_types.py +4 -4
- ee/element.py +15 -15
- ee/encodable.py +7 -4
- ee/errormargin.py +4 -4
- ee/feature.py +68 -71
- ee/featurecollection.py +41 -40
- ee/filter.py +90 -92
- ee/function.py +8 -8
- ee/geometry.py +95 -93
- ee/image.py +238 -236
- ee/image_converter.py +4 -4
- ee/imagecollection.py +30 -27
- ee/join.py +13 -15
- ee/kernel.py +55 -57
- ee/mapclient.py +9 -9
- ee/model.py +29 -31
- ee/oauth.py +76 -63
- ee/pixeltype.py +6 -6
- ee/projection.py +5 -4
- ee/reducer.py +41 -41
- ee/serializer.py +14 -14
- ee/table_converter.py +7 -6
- ee/terrain.py +7 -9
- ee/tests/_cloud_api_utils_test.py +21 -6
- ee/tests/_helpers_test.py +57 -4
- ee/tests/_state_test.py +49 -0
- ee/tests/algorithms.json +85 -2
- ee/tests/apifunction_test.py +5 -5
- ee/tests/batch_test.py +135 -57
- ee/tests/blob_test.py +5 -5
- ee/tests/classifier_test.py +3 -3
- ee/tests/clusterer_test.py +3 -3
- ee/tests/collection_test.py +48 -13
- ee/tests/confusionmatrix_test.py +3 -3
- ee/tests/data_test.py +484 -55
- ee/tests/daterange_test.py +4 -4
- ee/tests/deprecation_test.py +6 -4
- ee/tests/deserializer_test.py +64 -5
- ee/tests/dictionary_test.py +12 -12
- ee/tests/ee_array_test.py +3 -3
- ee/tests/ee_date_test.py +4 -4
- ee/tests/ee_list_test.py +3 -3
- ee/tests/ee_number_test.py +75 -30
- ee/tests/ee_string_test.py +11 -3
- ee/tests/ee_test.py +40 -22
- ee/tests/element_test.py +2 -2
- ee/tests/errormargin_test.py +1 -1
- ee/tests/feature_test.py +10 -10
- ee/tests/featurecollection_test.py +3 -3
- ee/tests/filter_test.py +4 -4
- ee/tests/function_test.py +5 -5
- ee/tests/geometry_point_test.py +3 -3
- ee/tests/geometry_test.py +93 -52
- ee/tests/image_converter_test.py +1 -3
- ee/tests/image_test.py +3 -3
- ee/tests/imagecollection_test.py +3 -3
- ee/tests/join_test.py +3 -3
- ee/tests/kernel_test.py +7 -3
- ee/tests/model_test.py +17 -5
- ee/tests/oauth_test.py +189 -7
- ee/tests/pixeltype_test.py +6 -7
- ee/tests/projection_test.py +5 -6
- ee/tests/reducer_test.py +16 -3
- ee/tests/serializer_test.py +39 -12
- ee/tests/table_converter_test.py +51 -7
- ee/tests/terrain_test.py +11 -3
- earthengine_api-1.5.13rc0.dist-info/RECORD +0 -107
- {earthengine_api-1.5.13rc0.dist-info → earthengine_api-1.7.4.dist-info}/entry_points.txt +0 -0
- {earthengine_api-1.5.13rc0.dist-info → earthengine_api-1.7.4.dist-info}/licenses/LICENSE +0 -0
- {earthengine_api-1.5.13rc0.dist-info → earthengine_api-1.7.4.dist-info}/top_level.txt +0 -0
ee/tests/algorithms.json
CHANGED
|
@@ -2265,7 +2265,7 @@
|
|
|
2265
2265
|
}, {
|
|
2266
2266
|
"argumentName": "geometryColumn",
|
|
2267
2267
|
"type": "String",
|
|
2268
|
-
"description": "The name of the column to use as the main feature geometry. If not specified,
|
|
2268
|
+
"description": "The name of the column to use as the main feature geometry. If not specified, the first column with GEOGRAPHY type will be used.",
|
|
2269
2269
|
"optional": true,
|
|
2270
2270
|
"defaultValue": null
|
|
2271
2271
|
}]
|
|
@@ -2280,7 +2280,7 @@
|
|
|
2280
2280
|
}, {
|
|
2281
2281
|
"argumentName": "geometryColumn",
|
|
2282
2282
|
"type": "String",
|
|
2283
|
-
"description": "The name of the column to use as the main feature geometry. If not specified,
|
|
2283
|
+
"description": "The name of the column to use as the main feature geometry. If not specified, the first geometry column will be used.",
|
|
2284
2284
|
"optional": true,
|
|
2285
2285
|
"defaultValue": null
|
|
2286
2286
|
}, {
|
|
@@ -9496,6 +9496,31 @@
|
|
|
9496
9496
|
"type": "String",
|
|
9497
9497
|
"description": "The Cloud Storage URI of the GeoTIFF to load. The bucket metadata must be accessible (requires the `storage.buckets.get` permission which is provided by the role \"Storage Legacy Bucket Reader\" among others, see https://cloud.google.com/storage/docs/access-control/iam-roles) and the bucket must be located in the US multi-region, a dual-region including US-CENTRAL1, or the US-CENTRAL1 region."
|
|
9498
9498
|
}]
|
|
9499
|
+
}, {
|
|
9500
|
+
"name": "algorithms/Image.loadZarrV2Array",
|
|
9501
|
+
"description": "Loads a Zarr v2 array as an Image. The array attributes (.zattrs) must contain the field \u0027_ARRAY_DIMENSIONS\u0027, which is a list of the names of each dimension (e.g., [\u0027time\u0027, \u0027y\u0027, \u0027x\u0027]). There must be at least two dimensions, with the final two representing Y and X respectively (e.g., [\u0027lat\u0027, \u0027lon\u0027]). The supported compression codecs are \u0027blosc\u0027, \u0027gzip\u0027, \u0027lz4\u0027, \u0027zlib\u0027, and \u0027zstd\u0027. The supported blosc meta-compression codecs are \u0027lz4\u0027, lz4hc\u0027, \u0027zlib\u0027, and \u0027zstd\u0027 (\u0027blosclz\u0027 is not supported).",
|
|
9502
|
+
"returnType": "Image\u003cunknown bands\u003e",
|
|
9503
|
+
"arguments": [{
|
|
9504
|
+
"argumentName": "uri",
|
|
9505
|
+
"type": "String",
|
|
9506
|
+
"description": "The Cloud Storage URI of the .zarray file to load. A .zmetadata file must be present in the parent directory of the array\u0027s directory (e.g., for \u0027gs://b/o/.zarray\u0027, \u0027gs://b/.zmetadata\u0027 must be present). The bucket metadata must be accessible (requires the `storage.buckets.get` permission which is provided by the role \"Storage Legacy Bucket Reader\" among others, see https://cloud.google.com/storage/docs/access-control/iam-roles) and the bucket must be located in the US multi-region, a dual-region including US-CENTRAL1, or the US-CENTRAL1 region."
|
|
9507
|
+
}, {
|
|
9508
|
+
"argumentName": "proj",
|
|
9509
|
+
"type": "Projection",
|
|
9510
|
+
"description": "The projection of the array."
|
|
9511
|
+
}, {
|
|
9512
|
+
"argumentName": "starts",
|
|
9513
|
+
"type": "List\u003cObject\u003e",
|
|
9514
|
+
"description": "The indices (inclusive) at which to start taking slices along each non-spatial dimension. If null, slices will start at index 0 for all non-spatial dimensions. If specified, this list must have a length equal to the number of non-spatial dimensions (total dimensions - 2). An individual element within the list may be null, which defaults to 0 for that dimension. Negative indices are counted from the end of the dimension (e.g., -1 is the last element).",
|
|
9515
|
+
"optional": true,
|
|
9516
|
+
"defaultValue": null
|
|
9517
|
+
}, {
|
|
9518
|
+
"argumentName": "ends",
|
|
9519
|
+
"type": "List\u003cObject\u003e",
|
|
9520
|
+
"description": "The indices (exclusive) at which to stop taking slices along each non-spatial dimension. If null, slices will extend to the end of each corresponding non-spatial dimension (i.e., defaults to the length of the dimension). If specified, this list must have a length equal to the number of non-spatial dimensions (total dimensions - 2). An individual element within the list may be null, which also defaults to the length of that dimension. Negative indices are counted from the end of the dimension (e.g., -1 is the last element).",
|
|
9521
|
+
"optional": true,
|
|
9522
|
+
"defaultValue": null
|
|
9523
|
+
}]
|
|
9499
9524
|
}, {
|
|
9500
9525
|
"name": "algorithms/Image.mask",
|
|
9501
9526
|
"description": "Gets or sets an image\u0027s mask. The output image retains the metadata and footprint of the input image. Pixels where the mask changes from zero to another value will be filled with zeros, or the values closest to zero within the range of the pixel type.\nNote: the version that sets a mask will be deprecated. To set a mask from an image on previously unmasked pixels, use Image.updateMask. To unmask previously masked pixels, use Image.unmask.",
|
|
@@ -11111,6 +11136,64 @@
|
|
|
11111
11136
|
"optional": true,
|
|
11112
11137
|
"defaultValue": null
|
|
11113
11138
|
}]
|
|
11139
|
+
}, {
|
|
11140
|
+
"name": "algorithms/ImageCollection.loadZarrV2Array",
|
|
11141
|
+
"description": "Loads a Zarr v2 array with 3 or more dimensions (i.e., 1 or more non-spatial dimensions) as an ImageCollection by slicing along a specified non-spatial axis. The array attributes (.zattrs) must contain the field \u0027_ARRAY_DIMENSIONS\u0027, which is a list of the names of each dimension (e.g., [\u0027time\u0027, \u0027y\u0027, \u0027x\u0027]). There must be at least two dimensions, with the final two representing Y and X respectively (e.g., [\u0027lat\u0027, \u0027lon\u0027]). The supported compression codecs are \u0027blosc\u0027, \u0027gzip\u0027, \u0027lz4\u0027, \u0027zlib\u0027, and \u0027zstd\u0027. The supported blosc meta-compression codecs are \u0027lz4\u0027, lz4hc\u0027, \u0027zlib\u0027, and \u0027zstd\u0027 (\u0027blosclz\u0027 is not supported).",
|
|
11142
|
+
"returnType": "ImageCollection",
|
|
11143
|
+
"arguments": [{
|
|
11144
|
+
"argumentName": "uri",
|
|
11145
|
+
"type": "String",
|
|
11146
|
+
"description": "The Cloud Storage URI of the .zarray file to load. A .zmetadata file must be present in the parent directory of the array\u0027s directory (e.g., for \u0027gs://b/o/.zarray\u0027, \u0027gs://b/.zmetadata\u0027 must be present). The bucket metadata must be accessible (requires the `storage.buckets.get` permission which is provided by the role \"Storage Legacy Bucket Reader\" among others, see https://cloud.google.com/storage/docs/access-control/iam-roles) and the bucket must be located in the US multi-region, a dual-region including US-CENTRAL1, or the US-CENTRAL1 region."
|
|
11147
|
+
}, {
|
|
11148
|
+
"argumentName": "proj",
|
|
11149
|
+
"type": "Projection",
|
|
11150
|
+
"description": "The projection of the array."
|
|
11151
|
+
}, {
|
|
11152
|
+
"argumentName": "axis",
|
|
11153
|
+
"type": "Integer",
|
|
11154
|
+
"description": "The non-spatial axis (0-indexed) along which to slice the array to create an ImageCollection. Each image in the collection represents a single slice (length 1) along this axis. If null, defaults to 0. The value must be in the range [0, N-1], where N is the number of non-spatial dimensions (i.e., total dimensions - 2). The array must have at least one non-spatial dimension (i.e., be at least 3 dimensional).",
|
|
11155
|
+
"optional": true,
|
|
11156
|
+
"defaultValue": null
|
|
11157
|
+
}, {
|
|
11158
|
+
"argumentName": "starts",
|
|
11159
|
+
"type": "List\u003cObject\u003e",
|
|
11160
|
+
"description": "The indices (inclusive) at which to start taking slices along each non-spatial dimension. If null, slices will start at index 0 for all non-spatial dimensions. If specified, this list must have a length equal to the number of non-spatial dimensions (total dimensions - 2). An individual element within the list may be null, which defaults to 0 for that dimension. Negative indices are counted from the end of the dimension (e.g., -1 is the last element).",
|
|
11161
|
+
"optional": true,
|
|
11162
|
+
"defaultValue": null
|
|
11163
|
+
}, {
|
|
11164
|
+
"argumentName": "ends",
|
|
11165
|
+
"type": "List\u003cObject\u003e",
|
|
11166
|
+
"description": "The indices (exclusive) at which to stop taking slices along each non-spatial dimension. If null, slices will extend to the end of each corresponding non-spatial dimension (i.e., defaults to the length of the dimension). If specified, this list must have a length equal to the number of non-spatial dimensions (total dimensions - 2). An individual element within the list may be null, which also defaults to the length of that dimension. Negative indices are counted from the end of the dimension (e.g., -1 is the last element).",
|
|
11167
|
+
"optional": true,
|
|
11168
|
+
"defaultValue": null
|
|
11169
|
+
}]
|
|
11170
|
+
}, {
|
|
11171
|
+
"name": "algorithms/SerializableZarrV2ArrayImage",
|
|
11172
|
+
"description": "INTERNAL",
|
|
11173
|
+
"returnType": "Image\u003cunknown bands\u003e",
|
|
11174
|
+
"arguments": [{
|
|
11175
|
+
"argumentName": "uri",
|
|
11176
|
+
"type": "String"
|
|
11177
|
+
}, {
|
|
11178
|
+
"argumentName": "proj",
|
|
11179
|
+
"type": "Projection"
|
|
11180
|
+
}, {
|
|
11181
|
+
"argumentName": "starts",
|
|
11182
|
+
"type": "List\u003cInteger\u003e"
|
|
11183
|
+
}, {
|
|
11184
|
+
"argumentName": "ends",
|
|
11185
|
+
"type": "List\u003cInteger\u003e"
|
|
11186
|
+
}, {
|
|
11187
|
+
"argumentName": "arrayName",
|
|
11188
|
+
"type": "String"
|
|
11189
|
+
}, {
|
|
11190
|
+
"argumentName": "arrayAsSerializableDictionary",
|
|
11191
|
+
"type": "Dictionary\u003cObject\u003e"
|
|
11192
|
+
}, {
|
|
11193
|
+
"argumentName": "dimensionNames",
|
|
11194
|
+
"type": "List\u003cString\u003e"
|
|
11195
|
+
}],
|
|
11196
|
+
"hidden": true
|
|
11114
11197
|
}, {
|
|
11115
11198
|
"name": "algorithms/ImageCollection.cast",
|
|
11116
11199
|
"description": "Casts some or all bands of each image in an ImageCollection to the specified types.",
|
ee/tests/apifunction_test.py
CHANGED
|
@@ -10,7 +10,7 @@ from ee import apitestcase
|
|
|
10
10
|
|
|
11
11
|
class ApiFunctionTest(apitestcase.ApiTestCase):
|
|
12
12
|
|
|
13
|
-
def
|
|
13
|
+
def test_add_functions(self):
|
|
14
14
|
"""Verifies that addition of static and instance API functions."""
|
|
15
15
|
|
|
16
16
|
# Check instance vs static functions, and trampling of
|
|
@@ -48,7 +48,7 @@ class ApiFunctionTest(apitestcase.ApiTestCase):
|
|
|
48
48
|
self.assertTrue(hasattr(TestClass, 'pre_addBands'))
|
|
49
49
|
self.assertFalse(hasattr(TestClass, '_pre_addBands'))
|
|
50
50
|
|
|
51
|
-
def
|
|
51
|
+
def test_add_functions_inherited(self):
|
|
52
52
|
"""Verifies that inherited non-client functions can be overridden."""
|
|
53
53
|
|
|
54
54
|
class Base:
|
|
@@ -66,7 +66,7 @@ class ApiFunctionTest(apitestcase.ApiTestCase):
|
|
|
66
66
|
self.assertNotEqual(Base.addBands, Child.addBands)
|
|
67
67
|
# pytype: enable=attribute-error
|
|
68
68
|
|
|
69
|
-
def
|
|
69
|
+
def test_eq(self):
|
|
70
70
|
a_signature = {'hello': 'world', 'args': []}
|
|
71
71
|
b_signature = {
|
|
72
72
|
'hello': 'world',
|
|
@@ -93,14 +93,14 @@ class ApiFunctionTest(apitestcase.ApiTestCase):
|
|
|
93
93
|
ee.ApiFunction(name='test', signature=a_signature), a_signature
|
|
94
94
|
)
|
|
95
95
|
|
|
96
|
-
def
|
|
96
|
+
def test_init_opt_params(self):
|
|
97
97
|
signature = {'hello': 'world', 'args': []}
|
|
98
98
|
self.assertEqual(
|
|
99
99
|
ee.ApiFunction(name='test', signature=signature),
|
|
100
100
|
ee.ApiFunction(name='test', opt_signature=signature),
|
|
101
101
|
)
|
|
102
102
|
|
|
103
|
-
def
|
|
103
|
+
def test_import_api_opt_params(self):
|
|
104
104
|
args = dict(
|
|
105
105
|
target=ee.Dictionary, prefix='Dictionary', type_name='Dictionary'
|
|
106
106
|
)
|