ARD Data Tools¶
The CLI offers several tools for working with ARD data stored in S3 or locally.
The base command for storage tools. Run this by itself to see all of the storage subcommands.
max-ard storage init¶
max-ard storage init LOCATION
Creates an S3 bucket if LOCATION does not exist, then authorizes the ARD data writer by adding a
PutObject statement to the bucket policy of LOCATION. The
Object Ownership policy is also set to
Bucket Owner Preferred so that ARD objects are in full control of the bucket owner.
If the bucket already exists:
% max-ard storage init my-ard-bucket Bucket exists at my-ard-bucket Added ARD writer policy to bucket Object Ownership set to Bucket Owner Preferred
% max-ard storage init my-ard-bucket Created bucket my-ard-bucket Added ARD writer policy to bucket Object Ownership set to Bucket Owner Preferred
max-ard storage revoke¶
max-ard storage revoke LOCATION
Removes the statement granting
PutObject permission to the ARD writer from the bucket LOCATION policy. Does not change 'Object Ownership'.
% max-ard storage revoke my-ard-bucket Removed ARD writer policy from bucket
max-ard storage describe¶
max-ard storage describe LOCATION
Returns info about ARD tiles store in LOCATION. Location can be S3 or local. Without any format options, returns a basic summary of contents. Can also create a QGIS layer files for the ARD files.
--destFile path to save output
--formatFormat to output to stdout, ignored if
--aoiGeometry to filter tiles to, only WKT supported.
--cat_idLimit result to this Catalog ID (can use more than once)
--zoneLimit tiles to those in this zone. Can be used multiple times. This option can speed up scan time of large collections.
--earliest_dateReturn results from on or after this date (YYYY-MM-DD)
--latest_dateReturn results from this date or earlier (YYYY-MM-DD)
--profileUse this AWS named profile for AWS access
--publicUse non-authenticated access to access a public AWS bucket
The following example uses sample ARD data:
% max-ard storage describe s3://maxar-ard-samples/sample-001/ Examining ARD data in s3://maxar-ard-samples/sample-001/... 4 acquisitions 8 tiles Earliest date: 2016-02-21 Latest date: 2020-10-22 UTM zone: 10
To generate a QGIS layer definition of the files stored in S3, add
--dest and a file path. We also use the option
--public here since we are accessing the public ARD sample datasets.
% max-ard storage describe s3://maxar-ard-samples/sample-001/ --public --dest san_francisco.qlr
--format instead to stream the output to
% max-ard storage describe s3://maxar-ard-samples/sample-001/ --public --format qlr > san_francisco.qlr
This will create a QGIS layer for every acquisition with subdirectories for each grid cell. Each cell then has a layer group for each acquisition which includes layers for the visual ARD tile, mask polygons, and the STAC metadata feature. If a mask source is empty and has no features, it will not be included in the export.
The layers are linked directly to the source files. If they are in S3 they will read directly from the cloud.
Note: QGIS layers files with large amounts of tiles can be slow to generate and even slower to open in QGIS. You may want to limit the number of layers generated using an AOI or date range.