earthengine-api 1.6.12__tar.gz → 1.6.13__tar.gz
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.6.12/earthengine_api.egg-info → earthengine_api-1.6.13}/PKG-INFO +1 -1
- {earthengine_api-1.6.12 → earthengine_api-1.6.13/earthengine_api.egg-info}/PKG-INFO +1 -1
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/__init__.py +1 -1
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/geometry.py +8 -4
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/geometry_test.py +20 -1
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/pyproject.toml +1 -1
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/LICENSE +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/MANIFEST.in +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/README.md +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/earthengine_api.egg-info/SOURCES.txt +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/earthengine_api.egg-info/dependency_links.txt +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/earthengine_api.egg-info/entry_points.txt +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/earthengine_api.egg-info/requires.txt +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/earthengine_api.egg-info/top_level.txt +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/_arg_types.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/_cloud_api_utils.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/_helpers.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/_state.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/_utils.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/apifunction.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/apitestcase.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/batch.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/blob.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/classifier.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/cli/__init__.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/cli/commands.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/cli/eecli.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/cli/eecli_wrapper.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/cli/utils.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/clusterer.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/collection.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/computedobject.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/confusionmatrix.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/customfunction.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/data.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/daterange.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/deprecation.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/deserializer.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/dictionary.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/ee_array.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/ee_date.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/ee_exception.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/ee_list.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/ee_number.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/ee_string.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/ee_types.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/element.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/encodable.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/errormargin.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/feature.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/featurecollection.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/filter.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/function.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/image.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/image_converter.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/imagecollection.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/join.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/kernel.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/mapclient.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/model.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/oauth.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/pixeltype.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/projection.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/py.typed +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/reducer.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/serializer.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/table_converter.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/terrain.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/_cloud_api_utils_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/_helpers_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/_state_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/_utils_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/algorithms.json +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/apifunction_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/batch_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/blob_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/classifier_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/cloud_api_discovery_document.json +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/clusterer_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/collection_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/computedobject_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/confusionmatrix_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/data_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/daterange_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/deprecation_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/deserializer_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/dictionary_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/ee_array_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/ee_date_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/ee_list_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/ee_number_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/ee_string_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/ee_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/ee_types_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/element_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/errormargin_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/feature_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/featurecollection_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/filter_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/function_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/geometry_point_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/image_converter_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/image_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/imagecollection_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/join_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/kernel_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/model_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/oauth_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/pixeltype_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/projection_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/reducer_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/serializer_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/table_converter_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/terrain_test.py +0 -0
- {earthengine_api-1.6.12 → earthengine_api-1.6.13}/setup.cfg +0 -0
|
@@ -43,6 +43,9 @@ class Geometry(computedobject.ComputedObject):
|
|
|
43
43
|
):
|
|
44
44
|
"""Creates a geometry.
|
|
45
45
|
|
|
46
|
+
Note that a creating a Geometry from a ComputedObject cannot have have any
|
|
47
|
+
overrides from the arguments proj, geodesic, or evenOdd.
|
|
48
|
+
|
|
46
49
|
Args:
|
|
47
50
|
geo_json: The GeoJSON object describing the geometry or a computed object
|
|
48
51
|
to be reinterpred as a Geometry. Supports CRS specifications as per the
|
|
@@ -56,8 +59,8 @@ class Geometry(computedobject.ComputedObject):
|
|
|
56
59
|
geodesic: Whether line segments should be interpreted as spherical
|
|
57
60
|
geodesics. If false, indicates that line segments should be interpreted
|
|
58
61
|
as planar lines in the specified CRS. If absent, defaults to true if the
|
|
59
|
-
CRS is geographic (including the default
|
|
60
|
-
|
|
62
|
+
CRS is geographic (including the default EPSG:4326), or to false if the
|
|
63
|
+
CRS is projected.
|
|
61
64
|
evenOdd: If true, polygon interiors will be determined by the even/odd
|
|
62
65
|
rule, where a point is inside if it crosses an odd number of edges to
|
|
63
66
|
reach a point at infinity. Otherwise polygons use the left-inside rule,
|
|
@@ -70,10 +73,11 @@ class Geometry(computedobject.ComputedObject):
|
|
|
70
73
|
self.initialize()
|
|
71
74
|
|
|
72
75
|
# pylint: disable-next=protected-access
|
|
76
|
+
has_resolved_geometry_type = getattr(geo_json, '_type', None) is not None
|
|
73
77
|
computed = isinstance(geo_json, computedobject.ComputedObject) and not (
|
|
74
|
-
isinstance(geo_json, Geometry) and
|
|
78
|
+
isinstance(geo_json, Geometry) and has_resolved_geometry_type
|
|
75
79
|
)
|
|
76
|
-
options = proj or geodesic or evenOdd
|
|
80
|
+
options = proj is not None or geodesic is not None or evenOdd is not None
|
|
77
81
|
if computed:
|
|
78
82
|
if options:
|
|
79
83
|
raise ee_exception.EEException(
|
|
@@ -691,7 +691,7 @@ class GeometryTest(apitestcase.ApiTestCase, parameterized.TestCase):
|
|
|
691
691
|
1) A geoJSON object.
|
|
692
692
|
2) A not-computed geometry.
|
|
693
693
|
3) A not-computed geometry with overrides.
|
|
694
|
-
4) A computed geometry.
|
|
694
|
+
4) A computed geometry with no overrides.
|
|
695
695
|
5) something to cast to geometry.
|
|
696
696
|
"""
|
|
697
697
|
line = ee.Geometry.LineString(1, 2, 3, 4)
|
|
@@ -729,6 +729,25 @@ class GeometryTest(apitestcase.ApiTestCase, parameterized.TestCase):
|
|
|
729
729
|
self.assertEqual(computed.func, geom.func)
|
|
730
730
|
self.assertEqual(computed.args, geom.args)
|
|
731
731
|
|
|
732
|
+
@parameterized.named_parameters(
|
|
733
|
+
('_proj', {'proj': 'some-proj'}),
|
|
734
|
+
('_geodesic', {'geodesic': False}),
|
|
735
|
+
('_geodesic_true', {'geodesic': True}),
|
|
736
|
+
('_evenOdd', {'evenOdd': False}),
|
|
737
|
+
('_evenOdd_true', {'evenOdd': True}),
|
|
738
|
+
)
|
|
739
|
+
def test_constructor_error_for_computed_geometry_with_overrides(self, kwargs):
|
|
740
|
+
"""Verifies that Geometry raises for computed geometries with overrides."""
|
|
741
|
+
computed_geometry = ee.Geometry.Polygon(
|
|
742
|
+
coords=[[[-35, -10], [-35, 10], [35, 10], [35, -10], [-35, -10]]],
|
|
743
|
+
geodesic=True,
|
|
744
|
+
)
|
|
745
|
+
with self.assertRaisesRegex(
|
|
746
|
+
ee.EEException,
|
|
747
|
+
'Setting the CRS or geodesic on a computed Geometry is not supported.',
|
|
748
|
+
):
|
|
749
|
+
ee.Geometry(computed_geometry, **kwargs)
|
|
750
|
+
|
|
732
751
|
def test_computed_geometries(self):
|
|
733
752
|
"""Verifies the computed object behavior of the Geometry constructor."""
|
|
734
753
|
line = ee.Geometry.LineString(1, 2, 3, 4)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{earthengine_api-1.6.12 → earthengine_api-1.6.13}/earthengine_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{earthengine_api-1.6.12 → earthengine_api-1.6.13}/ee/tests/cloud_api_discovery_document.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|