Skip to content

Commit

Permalink
Add configuration for TDS #6
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-laptop-vm committed Sep 6, 2022
1 parent d90e570 commit ba5f1fb
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ build_catalog_records:
$(PYTHON) ~/ogcapi_testbed17_dataset_d168/build_catalog/create_catalog.py -v
build_catalog_stac:
$(PYTHON) ~/ogcapi_testbed17_dataset_d168/build_catalog/create_catalog.py -v --stac
build_tds_stac:
$(PYTHON) ~/ogcapi_testbed17_dataset_d168/build_catalog/create_catalog.py -v --tds --stac


## Login to AWS via Docker for upload/download of container image
Expand Down
27 changes: 27 additions & 0 deletions build_catalog/configuration-tds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Catalog Id
catalog_id: "tds-catalog"

# Catalog description
catalog_title: "Testbed-18 TDS Catalog"

# Catalog description
catalog_desc: "Small test data set to test for Tested 18."

# Location of inputs files as url
url: "https://pixalytics-ogc-api.s3.eu-west-2.amazonaws.com/TDS/inputs/"

# Files to include in catalog
files: "20191115T102219_rgb_classification.tif,20191220T101537_rgb_classification.tif,20200831T101156_rgb_classification.tif,20201119T104910_rgb_classification.tif,20201214T101151_rgb_classification.tif"

# Spatial resolution
gsd: "10.0"

# Output directory
output_dir: "./ogcapi/TDS-CATALOG"

# YAML for API Records
yaml_file: "./tds-record.yml"

# Provider details
provider_name: "Pixalytics Ltd"
provider_url: "https://www.pixalytics.com/"
12 changes: 11 additions & 1 deletion build_catalog/create_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ def main():
action="store_true",
default=False,
)
parser.add_argument(
"-T",
"--tds",
help="Create Test Data Set catalog",
action="store_true",
default=False,
)
parser.add_argument(
"-c",
"--collection",
Expand Down Expand Up @@ -189,6 +196,8 @@ def main():
# Configuration to be loaded from main directory
if args.test:
CONFIGURATION_FILE_PATH = os.path.join(code_dir, "test-configuration.yaml")
elif args.tds:
CONFIGURATION_FILE_PATH = os.path.join(code_dir, "tds-configuration.yaml")
elif args.netcdf:
CONFIGURATION_FILE_PATH = os.path.join(code_dir, "configuration-nc.yaml")
elif args.netcdfsingle:
Expand Down Expand Up @@ -262,13 +271,14 @@ def main():

print("Date range {} to {}".format(dateval, end_dateval))

# Create catalog sub_folder - delete if exists
# Include netcdf in sub_folder name
if args.netcdf:
netcdf = "-nc"
elif args.netcdfsingle:
netcdf = "-nc-single"
else:
netcdf = ""
# Create catalog sub_folder - delete if exists
if args.stac or args.collection:
cat_folder = os.path.join(outdir, "{}-stac{}-v{}".format(catalog_id, netcdf, version))
else:
Expand Down
62 changes: 62 additions & 0 deletions build_catalog/tds-catalog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
mcf:
version: 1.0

metadata:
identifier: pix-t18-tds-test
language: en
language_alternate: none
charset: utf8
parentidentifier: parentid
hierarchylevel: catalog

identification:
language: en
charset: utf8
title: title
abstract: abstract
keywords:
default:
keywords_en: [tds,classification]
keywords_type: theme
topiccategory:
- LandUse
dates:
publication: 2021-05-11T00:00:00Z
fees: None
accessconstraints: None
rights_fr: Copyright (c) 2021 Pixalytics
url: http://xxx
extents:
spatial:
- bbox: [300000.0,9792040.0,408000.0,9850000.0]
crs: 32737
temporal:
- begin: 2020-08-31
end: 2020-08-31
status: finished
maintenancefrequency: infrequent

contact:
main: &contact_main
organization: Pixalytics Ltd
url: https://www.pixalytics.com/
individualname: Dr Samantha Lavender
positionname: Managing Director
phone: +44-1752-764407
fax: none
address: Plymouth Science Park
city: Plymouth
administrativearea: Devon
postalcode: PL6 8BX
country: United Kingom
email: [email protected]
hoursofservice: 0900h - 1700h GMT
contactinstructions: email

distribution: *contact_main

distribution:
s3:
url: https
type: application/json
function: item
85 changes: 85 additions & 0 deletions build_catalog/tds-record.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
mcf:
version: 1.0

metadata:
identifier: pix-t18-tds-test
language: en
language_alternate: none
charset: utf8
parentidentifier: parentid
hierarchylevel: dataset
datestamp: 2021-05-11
dataseturi: https://pixalytics-ogc-api.s3.eu-west-2.amazonaws.com/TDS/

spatial:
datatype: raster
geomtype: polygon

identification:
language: en
charset: utf8
title: title
abstract: abstract
keywords:
default:
keywords_en: [tds,classification]
keywords_type: theme
topiccategory:
- LandUse
dates:
publication: 2021-05-11T00:00:00Z
fees: None
accessconstraints: None
rights_fr: Copyright (c) 2021 Pixalytics
url: http://xxx
extents:
spatial:
- bbox: [300000.0,9792040.0,408000.0,9850000.0]
crs: 32737
temporal:
- begin: 2020-08-31
end: 2020-08-31
status: finished
maintenancefrequency: infrequent

content_info:
type: image
cloud_cover: 0
processing_level: 3.0
dimensions:
- name: band_1
- name: band_2
- name: band_3

# platform metadata, applicable to iso19139-2 output
acquisition:
platforms:
- identifier: PIX-TDS
description: Testbed-18 TDS Testing

contact:
main: &contact_main
organization: Pixalytics Ltd
url: https://www.pixalytics.com/
individualname: Dr Samantha Lavender
positionname: Managing Director
phone: +44-1752-764407
fax: none
address: Plymouth Science Park
city: Plymouth
administrativearea: Devon
postalcode: PL6 8BX
country: United Kingom
email: [email protected]
hoursofservice: 0900h - 1700h GMT
contactinstructions: email

distribution: *contact_main

distribution:
s3:
url: https://pixalytics-ogc-api.s3.eu-west-2.amazonaws.com/TDS/input/20200831T101156_rgb_classification.tif
type: GeoTIFF
name: test-data
description: Input test data
function: download

0 comments on commit ba5f1fb

Please sign in to comment.