@google/earthengine 0.1.388 → 0.1.390
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/BUILD +699 -0
- package/.tmp/METADATA +23 -0
- package/.tmp/VERSION_BUILD +47 -0
- package/build/browser.js +87 -86
- package/build/ee_api_js.js +16 -16
- package/build/ee_api_js_debug.js +64 -64
- package/build/ee_api_js_npm.js +87 -86
- package/build/main.js +87 -86
- package/package.json +1 -1
- package/src/apiclient.js +1 -1
- package/src/batch.js +2 -2
- package/src/data.js +245 -101
- package/src/eeapiclient/domain_object.ts +1 -0
- package/src/eeapiclient/multipart_request.ts +1 -0
- package/src/image.js +106 -59
- package/src/imagecollection.js +36 -15
package/src/data.js
CHANGED
|
@@ -370,24 +370,50 @@ ee.data.getAlgorithms = function(opt_callback) {
|
|
|
370
370
|
* @param {!ee.data.ImageVisualizationParameters} params
|
|
371
371
|
* The visualization parameters as a (client-side) JavaScript object.
|
|
372
372
|
* For Images and ImageCollections:
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
373
|
+
* <table>
|
|
374
|
+
* <tr>
|
|
375
|
+
* <td><code> image </code> (JSON string) The image to render.</td>
|
|
376
|
+
* </tr>
|
|
377
|
+
* <tr>
|
|
378
|
+
* <td><code> version </code> (number) Version number of
|
|
379
|
+
* image (or latest).</td>
|
|
380
|
+
* </tr>
|
|
381
|
+
* <tr>
|
|
382
|
+
* <td><code> bands </code> (comma-separated strings) Comma-delimited
|
|
383
|
+
* list of band names to be mapped to RGB.</td>
|
|
384
|
+
* </tr>
|
|
385
|
+
* <tr>
|
|
386
|
+
* <td><code> min </code> (comma-separated numbers) Value (or one
|
|
387
|
+
* per band) to map onto 00.</td>
|
|
388
|
+
* </tr>
|
|
389
|
+
* <tr>
|
|
390
|
+
* <td><code> max </code> (comma-separated numbers) Value (or one
|
|
391
|
+
* per band) to map onto FF.</td>
|
|
392
|
+
* </tr>
|
|
393
|
+
* <tr>
|
|
394
|
+
* <td><code> gain </code> (comma-separated numbers) Gain (or one
|
|
395
|
+
* per band) to map onto 00-FF.</td>
|
|
396
|
+
* </tr>
|
|
397
|
+
* <tr>
|
|
398
|
+
* <td><code> bias </code> (comma-separated numbers) Offset (or one
|
|
399
|
+
* per band) to map onto 00-FF.</td>
|
|
400
|
+
* </tr>
|
|
401
|
+
* <tr>
|
|
402
|
+
* <td><code> gamma </code> (comma-separated numbers) Gamma correction
|
|
403
|
+
* factor (or one per band).</td>
|
|
404
|
+
* </tr>
|
|
405
|
+
* <tr>
|
|
406
|
+
* <td><code> palette </code> (comma-separated strings) List of
|
|
407
|
+
* CSS-style color strings (single-band previews only).</td>
|
|
408
|
+
* </tr>
|
|
409
|
+
* <tr>
|
|
410
|
+
* <td><code> opacity </code> (number) a number between 0 and 1 for
|
|
411
|
+
* opacity.</td>
|
|
412
|
+
* </tr>
|
|
413
|
+
* <tr>
|
|
414
|
+
* <td><code> format </code> (string) Either "jpg" or "png".</td>
|
|
415
|
+
* </tr>
|
|
416
|
+
* </table>
|
|
391
417
|
* @param {function(?ee.data.RawMapId, string=)=} opt_callback
|
|
392
418
|
* An optional callback. If not supplied, the call is made synchronously.
|
|
393
419
|
* @return {?ee.data.RawMapId} The mapId call results, which may be passed to
|
|
@@ -487,8 +513,16 @@ ee.data.makeMapId_ = function(mapid, token, opt_urlFormat = '') {
|
|
|
487
513
|
* @param {!ee.data.FeatureViewVisualizationParameters} params
|
|
488
514
|
* The visualization parameters as a (client-side) JavaScript object.
|
|
489
515
|
* For FeatureView assets:
|
|
490
|
-
*
|
|
491
|
-
*
|
|
516
|
+
* <table>
|
|
517
|
+
* <tr>
|
|
518
|
+
* <td><code> assetId </code> (string) The asset ID for which to
|
|
519
|
+
* obtain a tiles key.</td>
|
|
520
|
+
* </tr>
|
|
521
|
+
* <tr>
|
|
522
|
+
* <td><code> visParams </code> (Object) The visualization parameters
|
|
523
|
+
* for this layer.</td>
|
|
524
|
+
* </tr>
|
|
525
|
+
* </table>
|
|
492
526
|
* @param {function(?ee.data.FeatureViewTilesKey, string=)=} opt_callback An
|
|
493
527
|
* optional callback. If not supplied, the call is made synchronously.
|
|
494
528
|
* @return {?ee.data.FeatureViewTilesKey} The call results. Null if a callback
|
|
@@ -527,14 +561,27 @@ ee.data.getFeatureViewTilesKey = function(params, opt_callback) {
|
|
|
527
561
|
* @param {string} asset The table asset ID to query.
|
|
528
562
|
* @param {!ee.api.ProjectsAssetsListFeaturesNamedParameters} params An object
|
|
529
563
|
* containing request parameters with the following possible values:
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
564
|
+
* <table>
|
|
565
|
+
* <tr>
|
|
566
|
+
* <td><code> pageSize </code> (number): An optional maximum number of
|
|
567
|
+
* results per page, default is 1000.</td>
|
|
568
|
+
* </tr>
|
|
569
|
+
* <tr>
|
|
570
|
+
* <td><code> pageToken </code> (string): An optional token identifying
|
|
571
|
+
* a page of results the server should return, usually taken from the
|
|
572
|
+
* response object.</td>
|
|
573
|
+
* </tr>
|
|
574
|
+
* <tr>
|
|
575
|
+
* <td><code> region </code> (string): If present, a geometry defining
|
|
576
|
+
* a query region, specified as a GeoJSON geometry
|
|
577
|
+
* string (see RFC 7946).</td>
|
|
578
|
+
* </tr>
|
|
579
|
+
* <tr>
|
|
580
|
+
* <td><code> filter </code> (comma-separated strings): If present,
|
|
581
|
+
* specifies additional simple property
|
|
582
|
+
* filters (see https://google.aip.dev/160).</td>
|
|
583
|
+
* </tr>
|
|
584
|
+
* </table>
|
|
538
585
|
* @param {function(?ee.api.ListFeaturesResponse, string=)=} opt_callback An
|
|
539
586
|
* optional callback, called with two parameters: the first is the resulting
|
|
540
587
|
* list of features and the second is an error string on failure. If not
|
|
@@ -581,10 +628,23 @@ ee.data.computeValue = function(obj, opt_callback) {
|
|
|
581
628
|
* Get a Thumbnail Id for a given asset.
|
|
582
629
|
* @param {!ee.data.ThumbnailOptions} params An object containing thumbnail
|
|
583
630
|
* options with the following possible values:
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
631
|
+
* <table>
|
|
632
|
+
* <tr>
|
|
633
|
+
* <td><code> image </code> (ee.Image) The image to make a
|
|
634
|
+
* thumbnail.</td>
|
|
635
|
+
* </tr>
|
|
636
|
+
* <tr>
|
|
637
|
+
* <td><code> bands </code> (array of strings) An array of band
|
|
638
|
+
* names.</td>
|
|
639
|
+
* </tr>
|
|
640
|
+
* <tr>
|
|
641
|
+
* <td><code> format </code> (string) The file
|
|
642
|
+
* format ("png", "jpg", "geotiff").</td>
|
|
643
|
+
* </tr>
|
|
644
|
+
* <tr>
|
|
645
|
+
* <td><code> name </code> (string): The base name.</td>
|
|
646
|
+
* </tr>
|
|
647
|
+
* </table>
|
|
588
648
|
* Use ee.Image.getThumbURL for region, dimensions, and visualization
|
|
589
649
|
* options support.
|
|
590
650
|
* @param {function(?ee.data.ThumbnailId, string=)=} opt_callback
|
|
@@ -734,44 +794,76 @@ ee.data.makeThumbUrl = function(id) {
|
|
|
734
794
|
*
|
|
735
795
|
* @param {!Object} params An object containing download options with the
|
|
736
796
|
* following possible values:
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
*
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
*
|
|
758
|
-
*
|
|
759
|
-
*
|
|
760
|
-
*
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
*
|
|
765
|
-
*
|
|
766
|
-
*
|
|
767
|
-
*
|
|
768
|
-
*
|
|
769
|
-
*
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
*
|
|
774
|
-
*
|
|
797
|
+
* <table>
|
|
798
|
+
* <tr>
|
|
799
|
+
* <td><code> name: </code> a base name to use when constructing
|
|
800
|
+
* filenames. Only applicable when format is "ZIPPED_GEO_TIFF" (default)
|
|
801
|
+
* or filePerBand is true. Defaults to the image id (or "download" for
|
|
802
|
+
* computed images) when format is "ZIPPED_GEO_TIFF" or filePerBand is
|
|
803
|
+
* true, otherwise a random character string is generated. Band names
|
|
804
|
+
* are appended when filePerBand is true.</td>
|
|
805
|
+
* </tr>
|
|
806
|
+
* <tr>
|
|
807
|
+
* <td><code> bands: </code> a description of the bands to download. Must
|
|
808
|
+
* be an array of band names or an array of dictionaries, each with the
|
|
809
|
+
* following keys (optional parameters apply only when filePerBand is
|
|
810
|
+
* true):<ul style="list-style-type:none;">
|
|
811
|
+
* <li><code> id: </code> the name of the band, a string, required.
|
|
812
|
+
* <li><code> crs: </code> an optional CRS string defining the
|
|
813
|
+
* band projection.</li>
|
|
814
|
+
* <li><code> crs_transform: </code> an optional array of 6 numbers
|
|
815
|
+
* specifying an affine transform from the specified CRS, in
|
|
816
|
+
* row-major order: [xScale, xShearing, xTranslation, yShearing,
|
|
817
|
+
* yScale, yTranslation]</li>
|
|
818
|
+
* <li><code> dimensions: </code> an optional array of two integers
|
|
819
|
+
* defining the width and height to which the band is cropped.</li>
|
|
820
|
+
* <li><code> scale: </code> an optional number, specifying the scale
|
|
821
|
+
* in meters of the band; ignored if crs and crs_transform are
|
|
822
|
+
* specified.</li></ul></td>
|
|
823
|
+
* </tr>
|
|
824
|
+
* <tr>
|
|
825
|
+
* <td><code> crs: </code> a default CRS string to use for any bands that
|
|
826
|
+
* do not explicitly specify one.</td>
|
|
827
|
+
* </tr>
|
|
828
|
+
* <tr>
|
|
829
|
+
* <td><code> crs_transform: </code> a default affine transform to use for
|
|
830
|
+
* any bands that do not specify one, of the same format as the
|
|
831
|
+
* <code>crs_transform</code> of bands.</td>
|
|
832
|
+
* </tr>
|
|
833
|
+
* <tr>
|
|
834
|
+
* <td><code> dimensions: </code> default image cropping dimensions to use
|
|
835
|
+
* for any bands that do not specify them.</td>
|
|
836
|
+
* </tr>
|
|
837
|
+
* <tr>
|
|
838
|
+
* <td><code> scale: </code> a default scale to use for any bands that do
|
|
839
|
+
* not specify one; ignored if <code>crs</code> and
|
|
840
|
+
* <code>crs_transform</code> are specified.</td>
|
|
841
|
+
* </tr>
|
|
842
|
+
* <tr>
|
|
843
|
+
* <td><code> region: </code> a polygon specifying a region to download;
|
|
844
|
+
* ignored if <code>crs</code> and <code>crs_transform</code> is
|
|
845
|
+
* specified.</td>
|
|
846
|
+
* </tr>
|
|
847
|
+
* <tr>
|
|
848
|
+
* <td><code> filePerBand: </code> whether to produce a separate GeoTIFF
|
|
849
|
+
* per band (boolean). Defaults to true. If false, a single GeoTIFF is
|
|
850
|
+
* produced and all band-level transformations will be ignored.</td>
|
|
851
|
+
* </tr>
|
|
852
|
+
* <tr>
|
|
853
|
+
* <td><code> format: </code> the download format. One of:
|
|
854
|
+
* <ul>
|
|
855
|
+
* <li> "ZIPPED_GEO_TIFF" (GeoTIFF file(s) wrapped in a zip file,
|
|
856
|
+
* default)</li>
|
|
857
|
+
* <li> "GEO_TIFF" (GeoTIFF file)</li>
|
|
858
|
+
* <li> "NPY" (NumPy binary format)</li>
|
|
859
|
+
* </ul>
|
|
860
|
+
* If "GEO_TIFF" or "NPY", filePerBand and all band-level
|
|
861
|
+
* transformations will be ignored. Loading a NumPy output results in
|
|
862
|
+
* a structured array.</td>
|
|
863
|
+
* </tr>
|
|
864
|
+
* <tr>
|
|
865
|
+
* <td><code> id: </code> deprecated, use image parameter.</td>
|
|
866
|
+
* </table>
|
|
775
867
|
* @param {function(?ee.data.DownloadId, string=)=} opt_callback An optional
|
|
776
868
|
* callback. If not supplied, the call is made synchronously.
|
|
777
869
|
* @return {?ee.data.DownloadId} A download id and token, or null if a callback
|
|
@@ -882,11 +974,23 @@ ee.data.makeDownloadUrl = function(id) {
|
|
|
882
974
|
* Get a download ID.
|
|
883
975
|
* @param {!Object} params An object containing table download options with the
|
|
884
976
|
* following possible values:
|
|
885
|
-
*
|
|
886
|
-
*
|
|
887
|
-
*
|
|
888
|
-
*
|
|
889
|
-
*
|
|
977
|
+
* <table>
|
|
978
|
+
* <tr>
|
|
979
|
+
* <td><code> table: </code> The feature collection to download.</td>
|
|
980
|
+
* </tr>
|
|
981
|
+
* <tr>
|
|
982
|
+
* <td><code> format: </code> The download format, CSV, JSON, KML,
|
|
983
|
+
* KMZ or TF_RECORD.</td>
|
|
984
|
+
* </tr>
|
|
985
|
+
* <tr>
|
|
986
|
+
* <td><code> selectors: </code> List of strings of selectors that can
|
|
987
|
+
* be used to determine which attributes will be downloaded.</td>
|
|
988
|
+
* </tr>
|
|
989
|
+
* <tr>
|
|
990
|
+
* <td><code> filename: </code> The name of the file that will
|
|
991
|
+
* be downloaded.</td>
|
|
992
|
+
* </tr>
|
|
993
|
+
* </table>
|
|
890
994
|
* @param {function(?ee.data.DownloadId, string=)=} opt_callback An optional
|
|
891
995
|
* callback. If not supplied, the call is made synchronously.
|
|
892
996
|
* @return {?ee.data.DownloadId} A download id and token, or null if a
|
|
@@ -1601,17 +1705,31 @@ ee.data.getList = function(params, opt_callback) {
|
|
|
1601
1705
|
* @param {string} parent The ID of the collection or folder to list.
|
|
1602
1706
|
* @param {!ee.api.ProjectsAssetsListAssetsNamedParameters=} opt_params An
|
|
1603
1707
|
* object containing optional request parameters with the following
|
|
1604
|
-
*
|
|
1605
|
-
*
|
|
1606
|
-
*
|
|
1607
|
-
*
|
|
1608
|
-
*
|
|
1609
|
-
*
|
|
1610
|
-
*
|
|
1611
|
-
*
|
|
1612
|
-
*
|
|
1613
|
-
*
|
|
1614
|
-
*
|
|
1708
|
+
* possible values:
|
|
1709
|
+
* <table>
|
|
1710
|
+
* <tr>
|
|
1711
|
+
* <td><code> pageSize </code> (string) The number of results to
|
|
1712
|
+
* return. Defaults to 1000.</td>
|
|
1713
|
+
* </tr>
|
|
1714
|
+
* <tr>
|
|
1715
|
+
* <td><code> pageToken </code> (string) The token for the page of
|
|
1716
|
+
* results to return.</td>
|
|
1717
|
+
* </tr>
|
|
1718
|
+
* <tr>
|
|
1719
|
+
* <td><code> filter </code> (string) An additional filter query to
|
|
1720
|
+
* apply. Example query: <code>properties.my_property>=1 AND
|
|
1721
|
+
* properties.my_property<2 AND
|
|
1722
|
+
* startTime >= "2019-01-01T00:00:00.000Z" AND
|
|
1723
|
+
* endTime < "2020-01-01T00:00:00.000Z" AND
|
|
1724
|
+
* intersects("{'type':'Point','coordinates':[0,0]}")</code>
|
|
1725
|
+
* See https://google.aip.dev/160 for how to construct a query.</td>
|
|
1726
|
+
* </tr>
|
|
1727
|
+
* <tr>
|
|
1728
|
+
* <td><code> view </code> (string) Specifies how much detail is
|
|
1729
|
+
* returned in the list. Either "FULL" (default) for all image
|
|
1730
|
+
* properties or "BASIC".</td>
|
|
1731
|
+
* </tr>
|
|
1732
|
+
* </table>
|
|
1615
1733
|
* @param {function(?ee.api.ListAssetsResponse, string=)=}
|
|
1616
1734
|
* opt_callback If not supplied, the call is made synchronously.
|
|
1617
1735
|
* @return {?ee.api.ListAssetsResponse}
|
|
@@ -1632,21 +1750,47 @@ ee.data.listAssets = function(
|
|
|
1632
1750
|
* @param {string} parent The ID of the image collection to list.
|
|
1633
1751
|
* @param {!Object=} opt_params An object containing optional request
|
|
1634
1752
|
* parameters with the following possible values:
|
|
1635
|
-
*
|
|
1636
|
-
*
|
|
1637
|
-
*
|
|
1638
|
-
*
|
|
1639
|
-
*
|
|
1640
|
-
*
|
|
1641
|
-
*
|
|
1642
|
-
*
|
|
1643
|
-
*
|
|
1644
|
-
*
|
|
1645
|
-
*
|
|
1646
|
-
*
|
|
1647
|
-
*
|
|
1648
|
-
*
|
|
1649
|
-
*
|
|
1753
|
+
* <table>
|
|
1754
|
+
* <tr>
|
|
1755
|
+
* <td><code> pageSize </code> (string) The number of results to return.
|
|
1756
|
+
* Defaults to 1000.</td>
|
|
1757
|
+
* </tr>
|
|
1758
|
+
* <tr>
|
|
1759
|
+
* <td><code> pageToken </code> (string) The token page of results to
|
|
1760
|
+
* return.</td>
|
|
1761
|
+
* </tr>
|
|
1762
|
+
* <tr>
|
|
1763
|
+
* <td><code> startTime </code> (ISO 8601 string) The minimum start
|
|
1764
|
+
* time (inclusive).</td>
|
|
1765
|
+
* </tr>
|
|
1766
|
+
* <tr>
|
|
1767
|
+
* <td><code> endTime </code> (ISO 8601 string) The maximum end
|
|
1768
|
+
* time (exclusive).</td>
|
|
1769
|
+
* </tr>
|
|
1770
|
+
* <tr>
|
|
1771
|
+
* <td><code> region </code> (GeoJSON or WKT string) A region to filter
|
|
1772
|
+
* on.</td>
|
|
1773
|
+
* </tr>
|
|
1774
|
+
* <tr>
|
|
1775
|
+
* <td><code> properties </code> (list of strings) A list of property
|
|
1776
|
+
* filters to apply, for example:
|
|
1777
|
+
* ["classification=urban", "size>=2"].</td>
|
|
1778
|
+
* </tr>
|
|
1779
|
+
* <tr>
|
|
1780
|
+
* <td><code> filter </code> (string) An additional filter query to
|
|
1781
|
+
* apply. Example query: <code>properties.my_property>=1 AND
|
|
1782
|
+
* properties.my_property<2 AND
|
|
1783
|
+
* startTime >= "2019-01-01T00:00:00.000Z" AND
|
|
1784
|
+
* endTime < "2020-01-01T00:00:00.000Z" AND
|
|
1785
|
+
* intersects("{'type':'Point','coordinates':[0,0]}")</code>
|
|
1786
|
+
* See https://google.aip.dev/160 for how to construct a query.</td>
|
|
1787
|
+
* </tr>
|
|
1788
|
+
* <tr>
|
|
1789
|
+
* <td><code> view </code> (string) Specifies how much detail is
|
|
1790
|
+
* returned in the list. Either "FULL" (default) for all image
|
|
1791
|
+
* properties or "BASIC".</td>
|
|
1792
|
+
* </tr>
|
|
1793
|
+
* </table>
|
|
1650
1794
|
* @param {function(?ee.data.ListImagesResponse, string=)=}
|
|
1651
1795
|
* opt_callback If not supplied, the call is made synchronously.
|
|
1652
1796
|
* @return {?ee.data.ListImagesResponse}
|
package/src/image.js
CHANGED
|
@@ -217,42 +217,74 @@ ee.Image.prototype.getMap = ee.Image.prototype.getMapId;
|
|
|
217
217
|
* Use getThumbURL for RGB visualization formats PNG and JPG.
|
|
218
218
|
* @param {Object} params An object containing download options with the
|
|
219
219
|
* following possible values:
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
* format is "ZIPPED_GEO_TIFF"
|
|
224
|
-
*
|
|
225
|
-
* filePerBand is
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
220
|
+
* <table>
|
|
221
|
+
* <tr>
|
|
222
|
+
* <td><code> name: </code> a base name to use when constructing
|
|
223
|
+
* filenames. Only applicable when format is "ZIPPED_GEO_TIFF" (default)
|
|
224
|
+
* or filePerBand is true. Defaults to the image id (or "download" for
|
|
225
|
+
* computed images) when format is "ZIPPED_GEO_TIFF" or filePerBand is
|
|
226
|
+
* true, otherwise a random character string is generated. Band names
|
|
227
|
+
* are appended when filePerBand is true.</td>
|
|
228
|
+
* </tr>
|
|
229
|
+
* <tr>
|
|
230
|
+
* <td><code> bands: </code> a description of the bands to download. Must
|
|
231
|
+
* be an array of band names or an array of dictionaries, each with the
|
|
232
|
+
* following keys (optional parameters apply only when filePerBand is
|
|
233
|
+
* true):<ul style="list-style-type:none;">
|
|
234
|
+
* <li><code> id: </code> the name of the band, a string, required.
|
|
235
|
+
* <li><code> crs: </code> an optional CRS string defining the
|
|
236
|
+
* band projection.</li>
|
|
237
|
+
* <li><code> crs_transform: </code> an optional array of 6 numbers
|
|
238
|
+
* specifying an affine transform from the specified CRS, in
|
|
239
|
+
* row-major order: [xScale, xShearing, xTranslation, yShearing,
|
|
240
|
+
* yScale, yTranslation]</li>
|
|
241
|
+
* <li><code> dimensions: </code> an optional array of two integers
|
|
242
|
+
* defining the width and height to which the band is cropped.</li>
|
|
243
|
+
* <li><code> scale: </code> an optional number, specifying the scale
|
|
244
|
+
* in meters of the band; ignored if crs and crs_transform are
|
|
245
|
+
* specified.</li></ul></td>
|
|
246
|
+
* </tr>
|
|
247
|
+
* <tr>
|
|
248
|
+
* <td><code> crs: </code> a default CRS string to use for any bands that
|
|
249
|
+
* do not explicitly specify one.</td>
|
|
250
|
+
* </tr>
|
|
251
|
+
* <tr>
|
|
252
|
+
* <td><code> crs_transform: </code> a default affine transform to use for
|
|
253
|
+
* any bands that do not specify one, of the same format as the
|
|
254
|
+
* <code>crs_transform</code> of bands.</td>
|
|
255
|
+
* </tr>
|
|
256
|
+
* <tr>
|
|
257
|
+
* <td><code> dimensions: </code> default image cropping dimensions to use
|
|
258
|
+
* for any bands that do not specify them.</td>
|
|
259
|
+
* </tr>
|
|
260
|
+
* <tr>
|
|
261
|
+
* <td><code> scale: </code> a default scale to use for any bands that do
|
|
262
|
+
* not specify one; ignored if <code>crs</code> and
|
|
263
|
+
* <code>crs_transform</code> are specified.</td>
|
|
264
|
+
* </tr>
|
|
265
|
+
* <tr>
|
|
266
|
+
* <td><code> region: </code> a polygon specifying a region to download;
|
|
267
|
+
* ignored if <code>crs</code> and <code>crs_transform</code> is
|
|
268
|
+
* specified.</td>
|
|
269
|
+
* </tr>
|
|
270
|
+
* <tr>
|
|
271
|
+
* <td><code> filePerBand: </code> whether to produce a separate GeoTIFF
|
|
272
|
+
* per band (boolean). Defaults to true. If false, a single GeoTIFF is
|
|
273
|
+
* produced and all band-level transformations will be ignored.</td>
|
|
274
|
+
* </tr>
|
|
275
|
+
* <tr>
|
|
276
|
+
* <td><code> format: </code> the download format. One of:
|
|
277
|
+
* <ul style="list-style-type:none;">
|
|
278
|
+
* <li> "ZIPPED_GEO_TIFF" (GeoTIFF file(s) wrapped in a zip file,
|
|
279
|
+
* default)</li>
|
|
280
|
+
* <li> "GEO_TIFF" (GeoTIFF file)</li>
|
|
281
|
+
* <li> "NPY" (NumPy binary format)</li>
|
|
282
|
+
* </ul>
|
|
283
|
+
* If "GEO_TIFF" or "NPY", filePerBand and all band-level transformations
|
|
284
|
+
* will be ignored. Loading a NumPy output results in a structured
|
|
285
|
+
* array.</td>
|
|
286
|
+
* </tr>
|
|
287
|
+
* </table>
|
|
256
288
|
* @param {function(string?, string=)=} opt_callback An optional
|
|
257
289
|
* callback. If not supplied, the call is made synchronously.
|
|
258
290
|
* @return {string|undefined} Returns a download URL, or undefined if a callback
|
|
@@ -284,13 +316,19 @@ ee.Image.prototype.getDownloadURL = function(params, opt_callback) {
|
|
|
284
316
|
* Applies transformations and returns the thumbId.
|
|
285
317
|
* @param {!Object} params Parameters identical to ee.data.getMapId, plus,
|
|
286
318
|
* optionally:
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
319
|
+
* <table>
|
|
320
|
+
* <tr>
|
|
321
|
+
* <td><code> dimensions </code> (a number or pair of numbers in format
|
|
322
|
+
* WIDTHxHEIGHT) Maximum dimensions of the thumbnail to render, in
|
|
323
|
+
* pixels. If only one number is passed, it is used as the maximum,
|
|
324
|
+
* and the other dimension is computed by proportional scaling.</td>
|
|
325
|
+
* </tr>
|
|
326
|
+
* <tr>
|
|
327
|
+
* <td><code> region </code> Geospatial region of the image to render,
|
|
328
|
+
* it may be an ee.Geometry, GeoJSON, or an array of lat/lon
|
|
329
|
+
* points (E,S,W,N). If not set the default is the bounds image.</td>
|
|
330
|
+
* </tr>
|
|
331
|
+
* </table>
|
|
294
332
|
* @param {function(?ee.data.ThumbnailId, string=)=} opt_callback
|
|
295
333
|
* An optional callback. If not supplied, the call is made synchronously.
|
|
296
334
|
* @return {?ee.data.ThumbnailId} The thumb ID and optional token, or null if a
|
|
@@ -318,14 +356,22 @@ ee.Image.prototype.getThumbId = function(params, opt_callback) {
|
|
|
318
356
|
* Get a thumbnail URL for this image.
|
|
319
357
|
* @param {!Object} params Parameters identical to ee.data.getMapId, plus,
|
|
320
358
|
* optionally:
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
359
|
+
* <table>
|
|
360
|
+
* <tr>
|
|
361
|
+
* <td><code> dimensions </code> (a number or pair of numbers in format
|
|
362
|
+
* WIDTHxHEIGHT) Maximum dimensions of the thumbnail to render, in
|
|
363
|
+
* pixels. If only one number is passed, it is used as the maximum,
|
|
364
|
+
* and the other dimension is computed by proportional scaling.</td>
|
|
365
|
+
* </tr>
|
|
366
|
+
* <tr>
|
|
367
|
+
* <td><code> region </code> Geospatial region of the image to render,
|
|
368
|
+
* it may be an ee.Geometry, GeoJSON, or an array of lat/lon
|
|
369
|
+
* points (E,S,W,N). If not set the default is the bounds image.</td>
|
|
370
|
+
* </tr>
|
|
371
|
+
* <tr>
|
|
372
|
+
* <td><code> format </code> (string) Either 'png' or 'jpg'.</td>
|
|
373
|
+
* </tr>
|
|
374
|
+
* </table>
|
|
329
375
|
* @param {function(string, string=)=} opt_callback An optional
|
|
330
376
|
* callback. If not supplied, the call is made synchronously.
|
|
331
377
|
* @return {string|undefined} A thumbnail URL, or undefined if a callback
|
|
@@ -433,14 +479,15 @@ ee.Image.combine_ = function(images, opt_names) {
|
|
|
433
479
|
* Selects bands from an image.
|
|
434
480
|
*
|
|
435
481
|
* @param {...*} var_args One of two possibilities:
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
482
|
+
* <ul>
|
|
483
|
+
* <li> Any number of non-list arguments. All of these will be interpreted as
|
|
484
|
+
* band selectors. These can be band names, regexes, or numeric indices.
|
|
485
|
+
* E.g. selected = image.select('a', 'b', 3, 'd');</li>
|
|
486
|
+
* <li> Two lists. The first will be used as band selectors and the second
|
|
487
|
+
* as new names for the selected bands. The number of new names must match
|
|
488
|
+
* the number of selected bands. E.g.
|
|
489
|
+
* selected = image.select(['a', 4], ['newA', 'newB']);</li>
|
|
490
|
+
* </ul>
|
|
444
491
|
* @return {!ee.Image} An image with the selected bands.
|
|
445
492
|
* @export
|
|
446
493
|
*/
|