RDA(DigitalGlobe栅格数据访问)¶
司机简称
RDA
2.3 新版功能.
生成依赖项
利勃曲尔
此驱动程序可以连接到DigitalGlobe RDA REST API。为了编译RDA驱动程序,必须使用Curl支持构建GDAL/OGR。
驱动程序检索图形上的元数据并按平铺提取栅格。支持数据类型byte、uint16、int16、uint32、int32、float32和float64。
DigitalGlobe RDA REST API支持任何有效的图形或模板。
不支持概述。
驱动程序功能¶
Supports Georeferencing
This driver supports georeferencing
数据集名称语法¶
打开数据源的最低语法是:
{"graphId":"some_value", "nodeId": "another_value"}
OR
{"templateId":"some_value", "parameters": { "someparam": "someparamval"}}
所以一个JSon序列化的文档有两个属性graph id和node-id。
例如,这些值可以从 GraphStudio .
连接字符串选项(可选)¶
"options": {"delete-on-close": false}
可以添加到JSon文档以请求在关闭数据集时不销毁缓存的磁贴和元数据。默认值(如果未指定)为true。
"options": {"max-connections": 32}
可以添加到JSon文档中,请求使用最大并发连接数获取缓存的磁贴。默认值(如果未指定)等于8 * CPU数量。
"options": {"advise-read": false}
可以添加到JSon文档以请求在读取数据集时不使用advise read。默认值(如果未指定)为true。
认证¶
访问API需要一个身份验证令牌。为此,必须向驱动程序提供2个参数(用户名、密码)。可以从以下配置选项或~/.gbdx配置文件中检索它们。
访问令牌将被缓存在~/.gdal/rda_cache/authentication.json中,并从那里重新使用,直到到达其过期期限。
配置选项¶
以下配置选项可用:
GBDX_AUTH_URL =值:指定OAuth身份验证终结点。默认为https://geobigdata.io/auth/v1/oauth/token/。如果未指定,则将使用~/.gbdx config中的auth_url参数(如果存在)。
GBDX_RDA_API_URL =值:指定RDAAPI端点。默认为https://rda.geobigdata.io/v1。如果未指定,则将使用~/.gbdx config中的rda_api_url参数(如果存在)。
GBDX_USERNAME =value:指定获取身份验证令牌所需的OAuth用户名。如果未指定,则必须设置~/.gbdx config中的用户名参数。
GBDX_PASSWORD =value:指定获取身份验证令牌所需的OAuth用户名。如果未指定,则必须设置~/.gbdx config中的password参数。
~/.gbdx配置文件¶
此文件可以在用户的主目录中创建(Unix上$home环境变量的值,Windows上$USERPROFILE)。它可以包含来自上述配置选项的值。
[gbdx]
auth_url = https://geobigdata.io/auth/v1/oauth/token/ (optional)
rda_api_url = https://rda.geobigdata.io/v1 (optional)
user_name = value (required)
user_password = value (required)
高速缓存¶
默认情况下,身份验证令牌缓存在~/.gdal/rda_缓存目录中。可以使用RDA_CACHE_DIR配置选项更改此目录。默认情况下,数据集元数据和磁贴将临时缓存在~/.gdal/rda_cache/{graph id}/{node id}中,并在关闭数据集时删除,除非
"options": {"delete-on-close": false}
在数据集名称中找到。
打开选项¶
默认情况下,并发下载数为8 最多64个CPU。最大并发连接数可以由 MAXCONNECT*选项
实例¶
显示元数据并保持其缓存:
gdalinfo '{"graphId":"832050eb7d271d8704c8889369ee0a8a1da82acdee1b20e1700b6d053e94d1fe","nodeId":"Orthorectify_hko89y", "options": {"delete-on-close": false}}'
Driver: RDA/DigitalGlobe Raster Data Access driver Files: none associated Size is 9911, 7084 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]] Origin = (-84.183163638386631,33.835018117204456) Pixel Size = (0.000020885734819,-0.000020885734819) Metadata: ACQUISITION_DATE=2017-04-07T16:25:29.156Z CLOUD_COVER=0.0 GSD=2.325 m SAT_AZIMUTH=163.7 SAT_ELEVATION=58.3 SENSOR_NAME=8-band (Coastal, Blue, Green, Yellow, Red, Red-edge, NIR1, NIR2) Multispectral SENSOR_PLATFORM_NAME=WV02 SUN_AZIMUTH=143.5 SUN_ELEVATION=58.6 Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left ( -84.1831636, 33.8350181) Lower Left ( -84.1831636, 33.6870636) Upper Right ( -83.9761651, 33.8350181) Lower Right ( -83.9761651, 33.6870636) Center ( -84.0796644, 33.7610408) Band 1 Block=256x256 Type=UInt16, ColorInterp=Undefined Band 2 Block=256x256 Type=UInt16, ColorInterp=Blue Band 3 Block=256x256 Type=UInt16, ColorInterp=Green Band 4 Block=256x256 Type=UInt16, ColorInterp=Yellow Band 5 Block=256x256 Type=UInt16, ColorInterp=Red Band 6 Block=256x256 Type=UInt16, ColorInterp=Undefined Band 7 Block=256x256 Type=UInt16, ColorInterp=Undefined Band 8 Block=256x256 Type=UInt16, ColorInterp=Undefined
从数据集中提取子窗口:
gdal_translate -srcwin 1000 2000 500 500 '{"graphId":"832050eb7d271d8704c8889369ee0a8a1da82acdee1b20e1700b6d053e94d1fe","nodeId":"Orthorectify_hko89y"}' out.tif
具体化指定自定义并发连接数的数据集:
gdal_translate -oo MAXCONNECT=96 '{"graphId":"832050eb7d271d8704c8889369ee0a8a1da82acdee1b20e1700b6d053e94d1fe","nodeId":"Orthorectify_hko89y"}' out.tif
从模板具体化数据集:
gdal_translate '{"templateId": "sample", "parameters": { "imageId": "afa56b05-35ad-47d1-bc7f-3e23d220482d"}}' out.tif