earthengine-api 1.6.12__py3-none-any.whl → 1.6.13rc0__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: earthengine-api
3
- Version: 1.6.12
3
+ Version: 1.6.13rc0
4
4
  Summary: Earth Engine Python API
5
5
  Author-email: Google LLC <noreply@google.com>
6
6
  License: Apache-2.0
@@ -1,5 +1,5 @@
1
- earthengine_api-1.6.12.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
2
- ee/__init__.py,sha256=L2apEDNlsV3UxIikUyUzdClLNt6hVoms8B6oj3VMsMs,16804
1
+ earthengine_api-1.6.13rc0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
2
+ ee/__init__.py,sha256=sPUQ-hmeq6MSAXUmmwZtJ0NGQFXFLJsowJrQencR-7o,16807
3
3
  ee/_arg_types.py,sha256=nrJrnPFnAS8fzMxAGmG3TbUOi_yFVrnSGW5IP8ATzDQ,2662
4
4
  ee/_cloud_api_utils.py,sha256=06xr56VvGeQHl6DTeoC9_YE0hKVtE11tMnDCv98TKSA,32998
5
5
  ee/_helpers.py,sha256=71xYDbCO_1usY3SnedoA9zi7j6dnPBijru1eUh4o25g,4859
@@ -34,7 +34,7 @@ ee/feature.py,sha256=WItnwlQp8U3D0E0YkgJNXIAk2JviwloS9c8j2XqbKEM,30292
34
34
  ee/featurecollection.py,sha256=XbDgzYEEyhim0_y2AOD5Wi-TRIl90OnB1DHtAJXgvg8,14424
35
35
  ee/filter.py,sha256=GKz3IqeZSrK4X26TjWaw_uOE8KjZgSx1pS1zM07PXfI,35321
36
36
  ee/function.py,sha256=X-Mz0AvF_l809NZXK8RM6fa2h-nP7YU2sUFp6hvIbdU,7049
37
- ee/geometry.py,sha256=6r2Y2E6H_adrBaWq9zzZZRFgq0KIe543rOSHaDHeNzY,59264
37
+ ee/geometry.py,sha256=D__UeT72DDaJFakmyaPnmfHwxNtDxLJW7Vbze0Hh2Y4,59517
38
38
  ee/image.py,sha256=LDidnOBIQaZ1Rv9X8H6DcNUzClRYxXcy2lHGoe5L6pA,170921
39
39
  ee/image_converter.py,sha256=CdeM5zMy0T_HylcFeoIcfZxjczWwOA2SklDLg6p9le8,1494
40
40
  ee/imagecollection.py,sha256=RcOd5j11x7324MYmvZG62ehyjzaGAnKqakhhXkYlOCc,27102
@@ -88,7 +88,7 @@ ee/tests/featurecollection_test.py,sha256=b3SwieXb8nyRzAlwKK_nSa4xGcy5AynIDZ1A3s
88
88
  ee/tests/filter_test.py,sha256=d-KQ_zI-r7BAMazKqqHMMzNUZdeC46BZiciMfthKEO8,35033
89
89
  ee/tests/function_test.py,sha256=0hv7H-Q21vdDvqHNH_3NvFj_nPEWM2Fh7CD0wgjXE2M,3131
90
90
  ee/tests/geometry_point_test.py,sha256=w9MYTwvw2Co9rIjffFB0ezQ_jZz8nxbdgOcyhqTTmjk,15093
91
- ee/tests/geometry_test.py,sha256=8KAevJgLpw38BzelpENiSOn0t0tGuHatxDiN1aKLUBk,31653
91
+ ee/tests/geometry_test.py,sha256=5cNblTtXg4gg0k1_6go4XL2EldY2StOfD7sQ7Bu0WZU,32424
92
92
  ee/tests/image_converter_test.py,sha256=uRXYOCU3a0ZaRTHw-ovVP8FJC2mVE9wbHd3JzoExkPs,1885
93
93
  ee/tests/image_test.py,sha256=_SJmee7orPot26vbxKEZcNZ6OsrNrxv3ToInWYLNZLM,150917
94
94
  ee/tests/imagecollection_test.py,sha256=qosRZXCbhwFuy8qR7DbA-FMl4ktW7Y2cUJHeXLcszpg,38444
@@ -102,8 +102,8 @@ ee/tests/reducer_test.py,sha256=NYJTmX6AmBZyXGjOkgUh4t3tB6E8_vGlPYQIxJQbV9Q,3151
102
102
  ee/tests/serializer_test.py,sha256=9t2jaDqrdxAAi3QOXZ0QbWnjExWdLODHdMVJSrtTBvU,8824
103
103
  ee/tests/table_converter_test.py,sha256=2F7DyEj-iHVbt9-W1iwAHDl-K1GA_2QHalTXzac2ot8,3373
104
104
  ee/tests/terrain_test.py,sha256=8TmvGconOR-GkGrll4joXhpU9zi0b_8GFxvX_JlcCos,4328
105
- earthengine_api-1.6.12.dist-info/METADATA,sha256=3UsVlBbhtRVYz55WRRZFItcyFazYmwc3h3SmUyOUYLY,2194
106
- earthengine_api-1.6.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
107
- earthengine_api-1.6.12.dist-info/entry_points.txt,sha256=-Ax4SCU-S474r8OD2LIxata6PRmkZoDrppQ4fP_exNc,50
108
- earthengine_api-1.6.12.dist-info/top_level.txt,sha256=go5zOwCgm5lIS3yTR-Vsxp1gNI4qdS-MP5eY-7zMxVY,3
109
- earthengine_api-1.6.12.dist-info/RECORD,,
105
+ earthengine_api-1.6.13rc0.dist-info/METADATA,sha256=VwxhScSEXzHn3NcW5nIm2wcWnZGjTJh1SLlRaMzDB9I,2197
106
+ earthengine_api-1.6.13rc0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
107
+ earthengine_api-1.6.13rc0.dist-info/entry_points.txt,sha256=-Ax4SCU-S474r8OD2LIxata6PRmkZoDrppQ4fP_exNc,50
108
+ earthengine_api-1.6.13rc0.dist-info/top_level.txt,sha256=go5zOwCgm5lIS3yTR-Vsxp1gNI4qdS-MP5eY-7zMxVY,3
109
+ earthengine_api-1.6.13rc0.dist-info/RECORD,,
ee/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """The EE Python library."""
2
2
 
3
- __version__ = '1.6.12'
3
+ __version__ = '1.6.13rc0'
4
4
 
5
5
  # Using lowercase function naming to match the JavaScript names.
6
6
  # pylint: disable=g-bad-name
ee/geometry.py CHANGED
@@ -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
- EPSG:4326), or to false if the CRS is projected.
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 geo_json._type is not None
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(
ee/tests/geometry_test.py CHANGED
@@ -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)