stac-extensions / label

Items that relate labeled AOIs with source imagery.
Apache License 2.0
9 stars 3 forks source link

Label:assets definition and example files don't align #14

Open KennSmithDS opened 1 year ago

KennSmithDS commented 1 year ago

What's the problem?

Clarity is needed on the exact intention and definition of the label:assets property of the label extension. As per the definition provided in the Links: source imagery section, this applies to each of the source item links within the label item links property list:

The keys for the assets within the source item to which this label item applies.

My interpretation of this definition is a list of the asset key names from the source item itself for which the label applies, and conversely not the asset key names from the label item nor the underlying label asset (e.g. GeoJSON asset). However, all of the example JSON files provided contradict this definition:

  1. The SpaceNet Roads example road_item.json by assumption is the label Item, and in the single link with rel==source, a value of road_labels is provided, which is the asset key name from the label Item, not the source Item. The source Item asset key names in road_source.json are ['rgb', 'multi', 'multi-pan', 'pan']. None of those source item assets appear in the label:assets property for the source item link within the label item.
  2. The SpaceNet Buildings example in the label Items for Vegas, Paris and Shanghai, all contain the value of OBJECTID_1 in the label:assets property of source links for the label item. This is a property key from the label asset GeoJSON file for the building footprint. Furthermore the source links are pointing to the .TIF asset and not a source item. As per the definition, the intended use for rel==source is "linking to the STAC Item representing the imagery", not the underlying source asset.
  3. The SpaceNet Buildings example in the label Items for Zanzibar have a value of building in the label:assets property which again is a property key from the label asset GeoJSON, and not the source item, and the source link points to a .TIF and not a source item.

What's the request?

  1. Add further clarity for the intention and clean up the definition for label:assets property, like what is the justification and usefulness of this field?
  2. Provide better examples that are consistent with the definition provided in the README.md for label:assets
fmigneault commented 9 months ago

I would like to have a validation regarding the examples as well. It is hard to guide users to employ this extension when the example use misleading values. My understanding of the label:assets property is that it should point to the relevant asset key.

Therefore, this example seems correct: https://github.com/stac-extensions/label/blob/main/examples/spacenet-roads/roads_item.json While all examples under https://github.com/stac-extensions/label/tree/main/examples/multidataset incorrectly refer to the class name instead of the asset containing the labels.

Also mentioned in #3