Skip to content

Commit

Permalink
Merge pull request #22 from NASA-IMPACT/V2Update
Browse files Browse the repository at this point in the history
V2 update
  • Loading branch information
sharkinsspatial authored Jul 4, 2021
2 parents df09cad + 9abd5ba commit 10ea92e
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 8 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,13 @@ Examle Usage
create_metadata file.hdf > metadata.xml # Send XML metadata to stdout
create_metadata file.hdf --save metadata.xml # Use --save argument to set destination
```

Run Metadata Interactively in Docker
```bash
docker run -it hls-metadata /bin/bash
cd hls-metadata
pip3 install .
create_metadata ../hls-testing_data/HLS.S30.T01LAH.2020097T222759.v1.5.hdf --save HLS.S30.T01LAH.2020097T222759.v1.5.xml
create_metadata ../hls-testing_data/HLS.L30.39TVF.2020158.165.v1.5.hdf --save HLS.L30.39TVF.2020158.165.v1.5.xml
create_metadata ../hls-testing_data/HLS.S30.T48UXF.2020274T041601.v1.5.hdf --save HLS.S30.T48UXF.2020274T041601.v1.5.xml
```
6 changes: 6 additions & 0 deletions metadata_creator/templates/L30.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
"Description": "Scale factor for thermal bands",
"Values":[0.01]
},
{
"Name": "ANG_SCALE_FACTOR",
"DataType": "FLOAT",
"Description": "Scale factor for angle bands",
"Values":[0.01]
},
{
"Name": "FILLVALUE",
"DataType": "INT",
Expand Down
1 change: 1 addition & 0 deletions metadata_creator/templates/L30_attribute_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"ADD_OFFSET":"NOT_IN_HDF",
"REF_SCALE_FACTOR":"NOT_IN_HDF",
"THERM_SCALE_FACTOR":"NOT_IN_HDF",
"ANG_SCALE_FACTOR":"NOT_IN_HDF",
"FILLVALUE":"NOT_IN_HDF",
"QA_FILLVALUE":"NOT_IN_HDF",
"NCOLS":"NCOLS",
Expand Down
6 changes: 6 additions & 0 deletions metadata_creator/templates/S30.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@
"Description": "Scale factor for reflectance bands",
"Values":[0.0001]
},
{
"Name": "ANG_SCALE_FACTOR",
"DataType": "FLOAT",
"Description": "Scale factor for angle bands",
"Values":[0.01]
},
{
"Name": "FILLVALUE",
"DataType": "INT",
Expand Down
1 change: 1 addition & 0 deletions metadata_creator/templates/S30_attribute_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"SPATIAL_RESAMPLING_ALG":"NOT_IN_HDF",
"ADD_OFFSET":"NOT_IN_HDF",
"REF_SCALE_FACTOR":"NOT_IN_HDF",
"ANG_SCALE_FACTOR":"NOT_IN_HDF",
"FILLVALUE":"NOT_IN_HDF",
"QA_FILLVALUE":"NOT_IN_HDF",
"NCOLS":"NCOLS",
Expand Down
5 changes: 0 additions & 5 deletions run_metadata_interactively.md

This file was deleted.

6 changes: 6 additions & 0 deletions tests/data/HLS.L30.39TVF.2020158.165.v1.5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@
<Value>0.01</Value>
</Values>
</AdditionalAttribute>
<AdditionalAttribute>
<Name>ANG_SCALE_FACTOR</Name>
<Values>
<Value>0.01</Value>
</Values>
</AdditionalAttribute>
<AdditionalAttribute>
<Name>FILLVALUE</Name>
<Values>
Expand Down
12 changes: 9 additions & 3 deletions tests/data/HLS.S30.T01LAH.2020097T222759.v1.5.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Granule>
<GranuleUR>HLS.S30.T01LAH.2020097T222759.v1.5</GranuleUR>
<InsertTime>2020-10-13T16:44:23.161695Z</InsertTime>
<LastUpdate>2020-10-13T16:44:23.161703Z</LastUpdate>
<InsertTime>2021-06-30T20:47:06.320553Z</InsertTime>
<LastUpdate>2021-06-30T20:47:06.320570Z</LastUpdate>
<Collection>
<DataSetId>HLS Sentinel-2 Multi-spectral Instrument Surface Reflectance Daily Global 30m v2.0</DataSetId>
</Collection>
Expand Down Expand Up @@ -167,6 +167,12 @@
<Value>0.0001</Value>
</Values>
</AdditionalAttribute>
<AdditionalAttribute>
<Name>ANG_SCALE_FACTOR</Name>
<Values>
<Value>0.01</Value>
</Values>
</AdditionalAttribute>
<AdditionalAttribute>
<Name>FILLVALUE</Name>
<Values>
Expand Down Expand Up @@ -329,4 +335,4 @@
<OnlineResources/>
<DataFormat>Cloud Optimized GeoTIFF (COG)</DataFormat>
<AssociatedBrowseImageUrls/>
</Granule>
</Granule>
6 changes: 6 additions & 0 deletions tests/data/HLS.S30.T48UXF.2020274T041601.v1.5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@
<Value>0.0001</Value>
</Values>
</AdditionalAttribute>
<AdditionalAttribute>
<Name>ANG_SCALE_FACTOR</Name>
<Values>
<Value>0.01</Value>
</Values>
</AdditionalAttribute>
<AdditionalAttribute>
<Name>FILLVALUE</Name>
<Values>
Expand Down

0 comments on commit 10ea92e

Please sign in to comment.