Opened 6 years ago

Closed 6 years ago

#1857 closed enhancement (fixed)

Petascope_filter coverage's local metadata when trimming/slicing and add it when encoding() by WCS/WCPS

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 9.7
Component: petascope Version: development
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

In http://rasdaman.org/ticket/1843, WCST_Import allows adding local metadata for each input file to coverage's metadata. Petascope needs to filter these local metadata based on trimming/slicing subsets via WCS/WCPS when encoding output.

If there is multiple local metadata then the list of local metadata. For example:

[
 {
    "key_1": "value_1",
    "fileReferenceHistory": "file_path_1"
 },
 {
    "key_1": "value_2",
    "fileReferenceHistory": "file_path_2"
 }
]

will be aggregated to only 1 map of keys and concatenated values

  {
      "key_1": "value1, value2"
      "fileReferenceHistory": "file_path_1, file_path2"
  }

Then this map can be encoded in Rasql as other keys, values of coverage's global metadata, e.g:

select encode(c, "tiff", "{ \"nodata\": [0], 
 \"metadata\": { \"global_key_1\": \"global_value_1\", \"global_key_2\": \"global_value_2\",
 \"key_1\": \"value_1, value_2\", \"fileReferenceHistory\": \"file_path_1, file_path_2\"}
 }")

Change History (1)

comment:1 by Bang Pham Huu, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.