Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common-lib/src/cmr/common/config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@
:data-quality-summary-draft ["1.0.0"]
:order-option-draft ["1.0.0"]
:grid-draft ["1.0.0"]
:visualization ["1.1.0"]
:visualization-draft ["1.1.0"]
:visualization ["1.2.0"]
:visualization-draft ["1.2.0"]
:citation ["1.0.0"]
:citation-draft ["1.0.0"]}
:parser #(json/parse-string % true)})
Expand Down
28 changes: 28 additions & 0 deletions schemas/resources/schemas/visualization-draft/v1.2.0/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"MetadataSpecification": {
"URL": "https://cdn.earthdata.nasa.gov/generic/config/v0.0.1",
"Name": "Generic-Config",
"Version": "0.0.1"
},
"Generic": {
"Name": "Visualization Draft",
"Version": "1.2.0"
},
"SubConceptType": "VISD",
"IndexSetup" : {
"index": {
"number_of_shards": 1,
"number_of_replicas": 1,
"refresh_interval": "1s"
}
},
"Indexes":
[
{
"Description": "Draft Visualization Short Name",
"Field": ".Name",
"Name": "name",
"Mapping": "string"
}
]
}
85 changes: 85 additions & 0 deletions schemas/resources/schemas/visualization-draft/v1.2.0/ingest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
## <a name="visualization-draft"></a> Visualization Draft

#### <a name="provider-info-visualization-draft"></a> /providers/&lt;provider-id&gt;/visualization-drafts/&lt;native-id&gt;

### <a name="create-update-visualization-draft"></a> Create / Update a Visualization Draft

Visualization Draft concepts can be created or updated by sending an HTTP PUT or POST with the metadata to the URL `%CMR-ENDPOINT%/providers/<provider-id>/visualization-drafts/<native-id>`. The response will include the [concept id](#concept-id) and the [revision id](#revision-id). The contents of the metadata is passed in the body of the request.

```
curl -XPOST \
-H "Cmr-Pretty: true" \
-H "Content-Type:application/vnd.nasa.cmr.umm+json" \
-H "Authorization: Bearer XXXX" \
"%CMR-ENDPOINT%/providers/PROV1/visualization-drafts/sampleNativeId" \
-d @sampleVisualization.json
```

#### Successful Response in XML

```
<?xml version="1.0" encoding="UTF-8"?>
<result>
<concept-id>VID1200000000-PROV1</concept-id>
<revision-id>1</revision-id>
<warnings></warnings>
<existing-errors></existing-errors>
</result>
```
Subsequent ingests to the Visualization Draft record will result in updates to its metadata as well as increment the revision-id of the record.

#### Successful Response in JSON

By passing the option `-H "Accept: application/json"` to `curl`, one may
get a JSON response:

```
{"concept-id":"VID1200000000-PROV1","revision-id":1,"warnings":null,"existing-errors":null}
```

### <a name="delete-visualization-draft"></a> Delete a Visualization Draft

Visualization Draft metadata can be deleted by sending an HTTP DELETE to the URL `%CMR-ENDPOINT%/providers/<provider-id>/visualization-drafts/<native-id>`. The response will include the [concept id](#concept-id) and the [revision id](#revision-id) of the tombstone.

```
curl -XDELETE \
-H "Cmr-Pretty: true" \
-H "Authorization: Bearer XXXX" \
%CMR-ENDPOINT%/providers/PROV1/visualization-drafts/sampleNative23Id"
```

#### Successful Response in XML

```
<?xml version="1.0" encoding="UTF-8"?>
<result>
<concept-id>VID1200000000-PROV1</concept-id>
<revision-id>2</revision-id>
</result>
```

#### Successful Response in JSON

```
{"concept-id":"VID1200000000-PROV1","revision-id":2,"warnings":null,"existing-errors":null}
```

Attempting to delete an already deleted record will return
the following error message

#### Unsuccessful Response in XML

```
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>Concept with native-id [sampleNative23Id] and concept-id [VID1200000000-PROV1] is already deleted.</error>
</errors>
```

#### Unsuccessful Response in JSON

```
"errors": [
"Concept with native-id [sampleNative23Id] and concept-id [VID1200000000-PROV1] is already deleted."
]
```
110 changes: 110 additions & 0 deletions schemas/resources/schemas/visualization-draft/v1.2.0/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"Identifier": "OPERA_L3_DSWX-HLS_LL_v1_STD",
"Name": "OPERA_L3_Dynamic_Surface_Water_Extent-HLS_v1_STD",
"Title": "OPERA Dynamic Surface Water Extent (L3)",
"Subtitle": "DSWx-HLS",
"Description": "YET_TO_SUPPLY",
"VisualizationType": "tiles",
"ScienceKeywords": [
{
"Category": "EARTH SCIENCE",
"Topic": "SPECTRAL/ENGINEERING",
"Term": "tbd",
"VariableLevel1": "tbd",
"DetailedVariable": "tbd"
},
{
"Category": "EARTH SCIENCE SERVICES",
"Topic": "DATA ANALYSIS AND VISUALIZATION",
"Term": "DATA VISUALIZATION",
"VariableLevel1": "tbd"
}
],
"ConceptIds": [
{
"Type": "STD",
"Value": "C2617126679-POCLOUD",
"ShortName": "OPERA_L3_DSWX-HLS_V1",
"Title": "OPERA Dynamic Surface Water Extent from Harmonized Landsat Sentinel-2 product (Version 1)",
"Version": "1.0",
"DataCenter": "POCLOUD"
}
],
"Specification": {
"ProductIdentification": {
"InternalIdentifier": "OPERA_L3_DSWX-HLS_LL_v1_STD",
"StandardOrNRTExternalIdentifier": "OPERA_L3_Dynamic_Surface_Water_Extent-HLS_v1_STD",
"BestAvailableExternalIdentifier": "OPERA_L3_Dynamic_Surface_Water_Extent-HLS",
"GIBSTitle": "OPERA Dynamic Surface Water Extent (L3, DSWx-HLS)",
"WorldviewTitle": "OPERA Dynamic Surface Water Extent (L3)",
"WorldviewSubtitle": "DSWx-HLS"
},
"ProductMetadata": {
"InternalIdentifier": "OPERA_L3_DSWX-HLS_LL_v1_STD",
"SourceDatasets": [
"C2617126679-POCLOUD"
],
"RepresentingDatasets": [
"C2617126679-POCLOUD"
],
"ScienceParameters": [
"dswx_hls"
],
"ParameterUnits": ["N/A"],
"Measurement": "Surface Water Extent",
"DataResolution": "resolution",
"GranuleOrComposite": "Granule",
"DataDayBreak": "00:00:00Z",
"VisualizationLatency": "1 day",
"UpdateInterval": 1440,
"TemporalCoverage": "2023-04-10/P1D",
"WGS84SpatialCoverage": [
-84.0,
-180.0,
84.0,
180.0
],
"NativeSpatialCoverage": [
-84.0,
-180.0,
84.0,
180.0
],
"AscendingOrDescending": "N/A",
"ColorMap": "colormap is embedded in the tif file",
"Ongoing": true,
"RetentionPeriod": -1,
"Daynight": [
"day"
],
"OrbitTracks": [
"OrbitTracks_Landsat-8_Descending",
"OrbitTracks_Sentinel-2A_Descending",
"OrbitTracks_Sentinel-2B_Descending"
],
"OrbitDirection": [
"descending"
],
"LayerPeriod": "Daily"
}
},
"Generation": {
"MRF" : {
"SourceProjection": "EPSG:4326",
"SourceResolution": "Native",
"SourceFormat": "GeoTIFF",
"SourceColorModel": "Indexed RGBA",
"SourceNoDataIndexOrRGB": "No Data",
"SourceCoverage": "Tiled",
"OutputProjection": "EPSG:4326",
"OutputResolution": "31.25m",
"OutputFormat": "PPNG"
}
},
"MetadataSpecification": {
"URL": "https://cdn.earthdata.nasa.gov/umm/visualization/v1.2.0",
"Name": "Visualization",
"Version": "1.2.0"
}
}

Loading
Loading