谷歌地球引擎数据API

2.4 新版功能.

司机简称

EEDA

生成依赖项

利勃曲尔

该驱动程序支持只读操作,使用Google Earth引擎REST API将图像及其元数据作为向量层列出。

驱动程序功能

Supports Georeferencing

This driver supports georeferencing

数据集名称语法

The minimal syntax to open a datasource is:

EEDA:[collection]

这里的集合类似于projects/earthingine public/assets/COPERNICUS/S2。

打开选项

以下打开选项可用:

  • COLLECTION =string:如果未在连接字符串中指定,则指定集合。

身份验证方法

可以使用以下身份验证方法:

  • Authentication Bearer header passed through the EEDA_BEARER or EEDA_BEARER_FILE configuration options.

  • Service account private key file, through the GOOGLE_APPLICATION_CREDENTIALS configuration option.

  • OAuth2 Service Account authentication through the EEDA_PRIVATE_KEY/ EEDA_PRIVATE_KEY_FILE + EEDA_CLIENT_EMAIL configuration options.

  • Finally if none of the above method succeeds, the code will check if the current machine is a Google Compute Engine instance, and if so will use the permissions associated to it (using the default service account associated with the VM). To force a machine to be detected as a GCE instance (for example for code running in a container with no access to the boot logs), you can set CPL_MACHINE_IS_GCE to YES.

配置选项

The following configuration options are available:

  • EEDA_BEARER =value: Authentication Bearer value to pass to the API. This option is only useful when the token is computed by external code. The bearer validity is typically one hour from the time where it as been requested.

  • EEDA_BEARER_FILE =filename: Similar to EEDA_BEARER option, except than instead of passing the value directly, it is the filename where the value should be read.

  • GOOGLE_APPLICATION_CREDENTIALS =file.json: Service account private key file that contains a private key and client email

  • EEDA_PRIVATE_KEY =string: RSA private key encoded as a PKCS#8 PEM file, with its header and footer. Used together with EEDA_CLIENT_EMAIL to use OAuth2 Service Account authentication. Requires GDAL to be built against libcrypto++ or libssl.

  • EEDA_PRIVATE_KEY_FILE =filename: Similar to EEDA_PRIVATE_KEY option, except than instead of passing the value directly, it is the filename where the key should be read.

  • EEDA_CLIENT_EMAIL =string: email to be specified together with EEDA_PRIVATE_KEY/EEDA_PRIVATE_KEY_FILE to use OAuth2 Service Account authentication.

  • EEDA_PAGE_SIZE: Features are retrieved from the server by chunks of 1000 by default (and this is the maximum value accepted by the server). This number can be altered with this configuration option.

属性

层字段定义是通过从集合中请求单个图像并从其“properties”元素猜测模式来构建的。还将读取GDAL配置中的“eedaconf.json”文件,以检查其中是否描述了集合架构,在这种情况下,将不会进行上述架构猜测。

以下属性将始终存在:

字段名

类型

意义

服务器端过滤器兼容

名称

图像名称(例如项目/土工公共/ assets/COPERNICUS/S2/20170430T190351_ 20170430T190351(第10段)

身份证件

图像ID;相当于没有“projects”的名称/ * /assets/”前缀(例如用户/用户/资产)

路径

(不推荐使用)映像路径;相当于id

gdal_dataset

GDAL数据集名称(例如。项目:公共工程/资产/哥白尼/S2/ 20170430T190351_20170430T190351_ T10SEG),可以用 EEDAI-谷歌地球引擎数据API图片 驱动

开始时间

DateTime

收购开始日期

Yes (限于>=顶层比较)

结束时间

DateTime

收购结束日期

Yes (限于<=顶层比较)

更新时间

DateTime

更新日期

大小字节

整数64

文件大小(字节)

band_count

整数

波段数

band_max_width

整数

带间最大宽度

band_max_height

整数

带间最大高度

band_min_pixel_size

真实的

带间最小像素大小

band_upper_left_x

真实的

X原点(仅在所有波段相等时设置)

band_upper_left_y

真实的

Y原点(仅在所有波段相等时设置)

band_crs

作为EPSG:XXXX或WKT的CRS(仅当在所有频带中相等时设置)

other_properties

带有键/值对的序列化JSon字典,其中键不是独立字段

“与服务器端筛选器兼容”是指当此字段包含在属性筛选器中时,它将被转发到服务器(否则仅执行客户端筛选)。

几何图形

每个图像的足迹报告为具有经纬度WGS84坐标系(EPSG:4326)的多多边形。

过滤

驱动程序将使用SetSpatialFilter()将任何空间筛选器集转发到服务器。它还使使用SetAttributeFilter()设置的简单属性过滤器具有相同的功能。支持3个布尔运算符(AND、OR、NOT)和比较运算符(=、<>、<、<=、>和>=)。

分页

Features are retrieved from the server by chunks of 1000 by default (and this is the maximum value accepted by the server). This number can be altered with the EEDA_PAGE_SIZE configuration option.

范围和特征计数

报告的区段和功能计数将始终分别为(-180、-90180、90)和-1,因为无法从服务器获得这些查询的有效答案。

实例

列出所有可用图像:

ogrinfo -ro -al "EEDA:" -oo COLLECTION=projects/earthengine-public/assets/COPERNICUS/S2 --config EEDA_CLIENT_EMAIL "my@email" --config EEDA_PRIVATE_KEY_FILE my.pem

ogrinfo -ro -al "EEDA:projects/earthengine-public/assets/COPERNICUS/S2" --config EEDA_CLIENT_EMAIL "my@email" --config EEDA_PRIVATE_KEY_FILE my.pem

列出(lat,lon)=(40,-100)点下的所有图像:

ogrinfo -ro -al "EEDA:projects/earthengine-public/assets/COPERNICUS/S2" -spat -100 40 -100 40 --config EEDA_CLIENT_EMAIL "my@email" --config EEDA_PRIVATE_KEY_FILE my.pem

列出所有可用的匹配条件:

ogrinfo -ro -al "EEDA:projects/earthengine-public/assets/COPERNICUS/S2" -where "startTime >= '2015/03/26 00:00:00' AND endTime <= '2015/06/30 00:00:00' AND CLOUDY_PIXEL_PERCENTAGE < 10" --config EEDA_CLIENT_EMAIL "my@email" --config EEDA_PRIVATE_KEY_FILE my.pem

参见: