earthengine-api 1.5.8rc0__tar.gz → 1.5.9rc2__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.

Files changed (113) hide show
  1. {earthengine_api-1.5.8rc0/earthengine_api.egg-info → earthengine_api-1.5.9rc2}/PKG-INFO +3 -2
  2. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2/earthengine_api.egg-info}/PKG-INFO +3 -2
  3. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/__init__.py +1 -1
  4. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/featurecollection.py +43 -0
  5. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/algorithms.json +93 -1
  6. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/featurecollection_test.py +46 -1
  7. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/pyproject.toml +1 -1
  8. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/LICENSE +0 -0
  9. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/MANIFEST.in +0 -0
  10. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/README.md +0 -0
  11. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/earthengine_api.egg-info/SOURCES.txt +0 -0
  12. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/earthengine_api.egg-info/dependency_links.txt +0 -0
  13. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/earthengine_api.egg-info/entry_points.txt +0 -0
  14. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/earthengine_api.egg-info/requires.txt +0 -0
  15. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/earthengine_api.egg-info/top_level.txt +0 -0
  16. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/_arg_types.py +0 -0
  17. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/_cloud_api_utils.py +0 -0
  18. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/_helpers.py +0 -0
  19. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/_utils.py +0 -0
  20. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/apifunction.py +0 -0
  21. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/apitestcase.py +0 -0
  22. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/batch.py +0 -0
  23. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/blob.py +0 -0
  24. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/classifier.py +0 -0
  25. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/cli/__init__.py +0 -0
  26. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/cli/commands.py +0 -0
  27. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/cli/eecli.py +0 -0
  28. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/cli/eecli_wrapper.py +0 -0
  29. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/cli/utils.py +0 -0
  30. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/clusterer.py +0 -0
  31. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/collection.py +0 -0
  32. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/computedobject.py +0 -0
  33. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/confusionmatrix.py +0 -0
  34. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/customfunction.py +0 -0
  35. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/data.py +0 -0
  36. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/daterange.py +0 -0
  37. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/deprecation.py +0 -0
  38. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/deserializer.py +0 -0
  39. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/dictionary.py +0 -0
  40. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/ee_array.py +0 -0
  41. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/ee_date.py +0 -0
  42. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/ee_exception.py +0 -0
  43. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/ee_list.py +0 -0
  44. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/ee_number.py +0 -0
  45. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/ee_string.py +0 -0
  46. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/ee_types.py +0 -0
  47. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/element.py +0 -0
  48. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/encodable.py +0 -0
  49. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/errormargin.py +0 -0
  50. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/feature.py +0 -0
  51. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/filter.py +0 -0
  52. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/function.py +0 -0
  53. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/geometry.py +0 -0
  54. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/image.py +0 -0
  55. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/image_converter.py +0 -0
  56. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/imagecollection.py +0 -0
  57. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/join.py +0 -0
  58. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/kernel.py +0 -0
  59. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/mapclient.py +0 -0
  60. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/model.py +0 -0
  61. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/oauth.py +0 -0
  62. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/pixeltype.py +0 -0
  63. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/projection.py +0 -0
  64. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/py.typed +0 -0
  65. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/reducer.py +0 -0
  66. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/serializer.py +0 -0
  67. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/table_converter.py +0 -0
  68. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/terrain.py +0 -0
  69. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/_cloud_api_utils_test.py +0 -0
  70. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/_helpers_test.py +0 -0
  71. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/_utils_test.py +0 -0
  72. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/apifunction_test.py +0 -0
  73. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/batch_test.py +0 -0
  74. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/blob_test.py +0 -0
  75. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/classifier_test.py +0 -0
  76. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/cloud_api_discovery_document.json +0 -0
  77. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/clusterer_test.py +0 -0
  78. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/collection_test.py +0 -0
  79. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/computedobject_test.py +0 -0
  80. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/confusionmatrix_test.py +0 -0
  81. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/data_test.py +0 -0
  82. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/daterange_test.py +0 -0
  83. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/deprecation_test.py +0 -0
  84. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/deserializer_test.py +0 -0
  85. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/dictionary_test.py +0 -0
  86. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/ee_array_test.py +0 -0
  87. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/ee_date_test.py +0 -0
  88. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/ee_list_test.py +0 -0
  89. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/ee_number_test.py +0 -0
  90. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/ee_string_test.py +0 -0
  91. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/ee_test.py +0 -0
  92. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/ee_types_test.py +0 -0
  93. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/element_test.py +0 -0
  94. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/errormargin_test.py +0 -0
  95. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/feature_test.py +0 -0
  96. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/filter_test.py +0 -0
  97. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/function_test.py +0 -0
  98. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/geometry_point_test.py +0 -0
  99. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/geometry_test.py +0 -0
  100. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/image_converter_test.py +0 -0
  101. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/image_test.py +0 -0
  102. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/imagecollection_test.py +0 -0
  103. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/join_test.py +0 -0
  104. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/kernel_test.py +0 -0
  105. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/model_test.py +0 -0
  106. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/oauth_test.py +0 -0
  107. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/pixeltype_test.py +0 -0
  108. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/projection_test.py +0 -0
  109. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/reducer_test.py +0 -0
  110. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/serializer_test.py +0 -0
  111. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/table_converter_test.py +0 -0
  112. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/ee/tests/terrain_test.py +0 -0
  113. {earthengine_api-1.5.8rc0 → earthengine_api-1.5.9rc2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: earthengine-api
3
- Version: 1.5.8rc0
3
+ Version: 1.5.9rc2
4
4
  Summary: Earth Engine Python API
5
5
  Author-email: Google LLC <noreply@google.com>
6
6
  License: Apache-2.0
@@ -36,6 +36,7 @@ Provides-Extra: tests
36
36
  Requires-Dist: absl-py; extra == "tests"
37
37
  Requires-Dist: geopandas; extra == "tests"
38
38
  Requires-Dist: numpy; extra == "tests"
39
+ Dynamic: license-file
39
40
 
40
41
  Visit the [Google Earth Engine Python installation page](https://developers.google.com/earth-engine/python_install)
41
42
  for set up instructions.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: earthengine-api
3
- Version: 1.5.8rc0
3
+ Version: 1.5.9rc2
4
4
  Summary: Earth Engine Python API
5
5
  Author-email: Google LLC <noreply@google.com>
6
6
  License: Apache-2.0
@@ -36,6 +36,7 @@ Provides-Extra: tests
36
36
  Requires-Dist: absl-py; extra == "tests"
37
37
  Requires-Dist: geopandas; extra == "tests"
38
38
  Requires-Dist: numpy; extra == "tests"
39
+ Dynamic: license-file
39
40
 
40
41
  Visit the [Google Earth Engine Python installation page](https://developers.google.com/earth-engine/python_install)
41
42
  for set up instructions.
@@ -1,6 +1,6 @@
1
1
  """The EE Python library."""
2
2
 
3
- __version__ = '1.5.8rc0'
3
+ __version__ = '1.5.9rc2'
4
4
 
5
5
  # Using lowercase function naming to match the JavaScript names.
6
6
  # pylint: disable=g-bad-name
@@ -331,6 +331,25 @@ class FeatureCollection(collection.Collection):
331
331
  reducer,
332
332
  )
333
333
 
334
+ @staticmethod
335
+ def loadBigQueryTable(
336
+ table: _arg_types.String,
337
+ geometryColumn: Optional[_arg_types.String] = None,
338
+ ) -> FeatureCollection:
339
+ """Returns a FeatureCollection containing data read from a BigQuery table.
340
+
341
+ Args:
342
+ table: Path to BigQuery table in a project.dataset.table format.
343
+ geometryColumn: The name of the column to use as the main feature
344
+ geometry. If not specified, all features will have null geometry.
345
+ """
346
+
347
+ return apifunction.ApiFunction.call_(
348
+ 'FeatureCollection.loadBigQueryTable',
349
+ table,
350
+ geometryColumn,
351
+ )
352
+
334
353
  def makeArray(
335
354
  self,
336
355
  properties: _arg_types.List,
@@ -384,3 +403,27 @@ class FeatureCollection(collection.Collection):
384
403
  return apifunction.ApiFunction.call_(
385
404
  'FeatureCollection.randomPoints', region, points, seed, maxError
386
405
  )
406
+
407
+ @staticmethod
408
+ def runBigQuery(
409
+ query: _arg_types.String,
410
+ geometryColumn: Optional[_arg_types.String] = None,
411
+ maxBytesBilled: Optional[_arg_types.Integer] = int(1e11),
412
+ ) -> FeatureCollection:
413
+ """Returns a FeatureCollection containing result of a BigQuery query.
414
+
415
+ Args:
416
+ query: GoogleSQL query to perform on the BigQuery resources.
417
+ geometryColumn: The name of the column to use as the main feature
418
+ geometry. If not specified, all features will have null geometry.
419
+ maxBytesBilled: Maximum number of bytes billed while processing the query.
420
+ Any BigQuery job that exceeds this limit will fail and won't be billed.
421
+ Defaults to 100GB.
422
+ """
423
+
424
+ return apifunction.ApiFunction.call_(
425
+ 'FeatureCollection.runBigQuery',
426
+ query,
427
+ geometryColumn,
428
+ maxBytesBilled
429
+ )
@@ -613,6 +613,51 @@
613
613
  "optional": true,
614
614
  "defaultValue": 25000.0
615
615
  }]
616
+ }, {
617
+ "name": "algorithms/TemporalSegmentation.C2c",
618
+ "description": "An implementation of the Composite 2 Change (C2C) algorithm. This algorithm segments a time series using a piecewise linear fit with the minimum of segments required to fit the data within the given maximum root mean squared error (RMSE). For every band given the algorithm will return the following bands:\n changeDate:A 1D array of doubles representing pairs of start and end dates for each fitted segment. The date format is determined by the dateFormat argument.\n value: A 1D array of doubles of the value of the band at the changeDate.\n magnitude: A 1D array of doubles providing the absolute difference between the values before and after a change date. The first magnitude is always NaN.\n duration: A 1D array of doubles of the duration of the segment preceding the change date. The first duration is always NaN.\n rate: A 1D array of doubles of the rate of change of the data preceding the. change date. The first rate is always NaN.\n postMagnitude: A 1D array of doubles of the absolute difference between the values after the change date and the value at the change date. The last postMagnitude is always NaN.\n postDuration: The duration of the segment following the change date. The last postDuration is always NaN.\n postRate: The rate of change of the data following the change date. The last postRate is always NaN.\n See Hermosilla et al. (2015) dx.doi.org/10.1016/j.rse.2014.11.005 for further details on the original algorithm.\n This algorithm is in preview and is subject to change.",
619
+ "returnType": "Image\u003cunknown bands\u003e",
620
+ "arguments": [{
621
+ "argumentName": "collection",
622
+ "type": "ImageCollection",
623
+ "description": "Collection of images on which to run C2C."
624
+ }, {
625
+ "argumentName": "dateFormat",
626
+ "type": "Integer",
627
+ "description": "The time representation to use during fitting: 0 \u003d jDays, 1 \u003d fractional years, 2 \u003d unix time in milliseconds. The start, end and break times for each temporal segment will be encoded this way.",
628
+ "optional": true,
629
+ "defaultValue": 0.0
630
+ }, {
631
+ "argumentName": "maxError",
632
+ "type": "Float",
633
+ "optional": true,
634
+ "defaultValue": 75.0
635
+ }, {
636
+ "argumentName": "maxSegments",
637
+ "type": "Integer",
638
+ "optional": true,
639
+ "defaultValue": 6.0
640
+ }, {
641
+ "argumentName": "startYear",
642
+ "type": "Integer",
643
+ "optional": true,
644
+ "defaultValue": 1984.0
645
+ }, {
646
+ "argumentName": "endYear",
647
+ "type": "Integer",
648
+ "optional": true,
649
+ "defaultValue": 2019.0
650
+ }, {
651
+ "argumentName": "infill",
652
+ "type": "Boolean",
653
+ "optional": true,
654
+ "defaultValue": true
655
+ }, {
656
+ "argumentName": "spikesTolerance",
657
+ "type": "Float",
658
+ "optional": true,
659
+ "defaultValue": 0.85
660
+ }]
616
661
  }, {
617
662
  "name": "algorithms/TemporalSegmentation.StructuralChangeBreakpoints",
618
663
  "description": "Runs breakpoint detection, similar to R\u0027s strucchange::breakpoints function.\nEach pixel is fit by a piecewise linear/harmonic model, of the form\nY \u003d A + B * t + C * cos(2 * pi * season(t)) + D * sin(2 * pi * season(t)) + E * cos(4 * pi * season(t)) + F * sin(4 * pi * season(t)) + ...\nIn this equation, \u0027t\u0027 is the start time of the image in the format specified by \u0027dateFormat\u0027, and \u0027season(t)\u0027 is the fractional year of that start time (see the description of dateFormat for details). The maximum order of the harmonic terms is determined by \u0027seasonalModelOrder\u0027.\nThe result is an image containing two bands, plus two bands per band in the input:\n`tStart`, `tEnd`: each of these holds a 1D array, with one entry per segment in the piecewise linear fit; each entry contains the start time of the first or last images in that segment. By default the values here are in fractional years, for easy use with the coefficients.\n`coefs_BANDNAME`: there will be one such output band per input band. Each of these holds a 2D array, with one row per segment. The values in that row are the coefficients of the linear fit for that segment - that is, the values of A, B, C, ... for that segment. As described above, the values here are affected by \u0027dateFormat\u0027\n.`rmse_BANDNAME`: there will be one such output band per input band. This holds a 1D array, with one entry per segment. The value for each segment is the RMSE for the linear fit residuals for that segment.",
@@ -779,6 +824,11 @@
779
824
  }, {
780
825
  "argumentName": "tileScale",
781
826
  "type": "Float"
827
+ }, {
828
+ "argumentName": "maxPixelsPerRegion",
829
+ "type": "Long",
830
+ "optional": true,
831
+ "defaultValue": null
782
832
  }],
783
833
  "hidden": true
784
834
  }, {
@@ -2204,6 +2254,42 @@
2204
2254
  "type": "Kernel",
2205
2255
  "description": "The kernel to have its entries inverted."
2206
2256
  }]
2257
+ }, {
2258
+ "name": "algorithms/FeatureCollection.loadBigQueryTable",
2259
+ "description": "Reads data from a BigQuery table and presents the results as a FeatureCollection.",
2260
+ "returnType": "FeatureCollection",
2261
+ "arguments": [{
2262
+ "argumentName": "table",
2263
+ "type": "String",
2264
+ "description": "Path to BigQuery table in a `project.dataset.table` format."
2265
+ }, {
2266
+ "argumentName": "geometryColumn",
2267
+ "type": "String",
2268
+ "description": "The name of the column to use as the main feature geometry. If not specified, all features will have null geometry.",
2269
+ "optional": true,
2270
+ "defaultValue": null
2271
+ }]
2272
+ }, {
2273
+ "name": "algorithms/FeatureCollection.runBigQuery",
2274
+ "description": "Runs a BigQuery query, fetches the results and presents the them as a FeatureCollection.",
2275
+ "returnType": "FeatureCollection",
2276
+ "arguments": [{
2277
+ "argumentName": "query",
2278
+ "type": "String",
2279
+ "description": "GoogleSQL query to perform on the BigQuery resources."
2280
+ }, {
2281
+ "argumentName": "geometryColumn",
2282
+ "type": "String",
2283
+ "description": "The name of the column to use as the main feature geometry. If not specified, all features will have null geometry.",
2284
+ "optional": true,
2285
+ "defaultValue": null
2286
+ }, {
2287
+ "argumentName": "maxBytesBilled",
2288
+ "type": "Long",
2289
+ "description": "Maximum number of bytes billed while processing the query. Any BigQuery job that exceeds this limit will fail and won\u0027t be billed.",
2290
+ "optional": true,
2291
+ "defaultValue": 1.0E11
2292
+ }]
2207
2293
  }, {
2208
2294
  "name": "algorithms/Classifier.naiveBayes",
2209
2295
  "description": "This classifier has been removed. For more information see: https://goo.gle/deprecated-classifiers.",
@@ -9402,7 +9488,7 @@
9402
9488
  "arguments": [{
9403
9489
  "argumentName": "uri",
9404
9490
  "type": "String",
9405
- "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 theUS-CENTRAL1 region."
9491
+ "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."
9406
9492
  }]
9407
9493
  }, {
9408
9494
  "name": "algorithms/Image.mask",
@@ -9763,6 +9849,12 @@
9763
9849
  "description": "A scaling factor used to reduce aggregation tile size; using a larger tileScale (e.g., 2 or 4) may enable computations that run out of memory with the default.",
9764
9850
  "optional": true,
9765
9851
  "defaultValue": 1.0
9852
+ }, {
9853
+ "argumentName": "maxPixelsPerRegion",
9854
+ "type": "Long",
9855
+ "description": "The maximum number of pixels to reduce per region.",
9856
+ "optional": true,
9857
+ "defaultValue": null
9766
9858
  }]
9767
9859
  }, {
9768
9860
  "name": "algorithms/Image.reduceResolution",
@@ -770,6 +770,26 @@ class FeatureCollectionTest(apitestcase.ApiTestCase):
770
770
  result = json.loads(expression.serialize())
771
771
  self.assertEqual(expect, result)
772
772
 
773
+ def test_load_big_query_table(self):
774
+ table = 'bigquery-public-data.new_york_subway.stations'
775
+ geometry_column = 'geometry'
776
+ expect = make_expression_graph({
777
+ 'arguments': {
778
+ 'table': {'constantValue': table},
779
+ 'geometryColumn': {'constantValue': geometry_column},
780
+ },
781
+ 'functionName': 'FeatureCollection.loadBigQueryTable',
782
+ })
783
+ expression = ee.FeatureCollection.loadBigQueryTable(table, geometry_column)
784
+ result = json.loads(expression.serialize())
785
+ self.assertEqual(expect, result)
786
+
787
+ expression = ee.FeatureCollection.loadBigQueryTable(
788
+ table=table, geometryColumn=geometry_column
789
+ )
790
+ result = json.loads(expression.serialize())
791
+ self.assertEqual(expect, result)
792
+
773
793
  def test_make_array(self):
774
794
  properties = ['a', 'b']
775
795
  name = 'name string'
@@ -951,7 +971,32 @@ class FeatureCollectionTest(apitestcase.ApiTestCase):
951
971
  self.assertEqual(expect, result)
952
972
 
953
973
  expression = collection.remap(
954
- lookupIn=lookup_in, lookupOut=lookup_out, columnName=column_name
974
+ lookupIn=lookup_in, lookupOut=lookup_out, columnName=column_name)
975
+ result = json.loads(expression.serialize())
976
+ self.assertEqual(expect, result)
977
+
978
+ def test_run_big_query(self):
979
+ query = 'SELECT * FROM `bigquery-public-data.new_york_subway.stations`'
980
+ geometry_column = 'geometry'
981
+ max_bytes_billed = 1000
982
+ expect = make_expression_graph({
983
+ 'arguments': {
984
+ 'query': {'constantValue': query},
985
+ 'geometryColumn': {'constantValue': geometry_column},
986
+ 'maxBytesBilled': {'constantValue': max_bytes_billed},
987
+ },
988
+ 'functionName': 'FeatureCollection.runBigQuery',
989
+ })
990
+ expression = ee.FeatureCollection.runBigQuery(
991
+ query, geometry_column, max_bytes_billed
992
+ )
993
+ result = json.loads(expression.serialize())
994
+ self.assertEqual(expect, result)
995
+
996
+ expression = ee.FeatureCollection.runBigQuery(
997
+ query=query,
998
+ geometryColumn=geometry_column,
999
+ maxBytesBilled=max_bytes_billed,
955
1000
  )
956
1001
  result = json.loads(expression.serialize())
957
1002
  self.assertEqual(expect, result)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "earthengine-api"
3
- version = "1.5.8rc0"
3
+ version = "1.5.9rc2"
4
4
  description = "Earth Engine Python API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"