stac-extensions/classification

Q & A

drwelby opened this issue · 12 comments

Questions I have or have seen others ask:

  • Are these Asset level only?
  • Can classification be used to describe a field in vector or tabular asset?
  • Classifications in one or more bands or fields?
  • Use as a colormap?
  • Handling ranges?

Currently using:

Waiting for a spec:

A lot of good questions in there.

Are these Asset level only?
No, we should also allow them in other contexts. I'd need them in assets and collection summaries at least.

Can classification be used to describe a field in vector or tabular asset?
I think yes, but we may want to leave this up to a dedicated vector or tabular extension to re-use and/or extend the classification extension. See also radiantearth/stac-spec#1150

Classifications in one or more bands or fields?
Yes, we may want to check how we can embed that with the raster extension.

Use as a colormap?
Handling ranges?

Sure, I think we may want to add some kind of a classification type flag. Indeed, this has also a lot of overlap with visualization/styling and showing legends, too. ;-)

Some examples that should already help with answering some of your questions:

{
  "classification:type": 'distinct',
  "classification:values": [
    {
      const: 1,
      color: '#123456',
      summary: 'Tree cover',
    },
    {
      minimum: 2, // i.e. the integers 2,3 and 4
      maximum: 4,
      color: '#FF00FF',
      summary: 'Shrubland',
    },
    ...
  ]
}
{
  "classification:type": 'linear',
  "classification:values": [
    {
      minimum: 0,
      color: '#FFFFFF',
      summary: '0 meters above sea-level',
    },
    {
      maximum: 8000,
      color: '#000000',
      summary: '8000 meters above sea-level',
    },
    ...
  ]
}

etc.

Interesting, I'll need to think about the examples...

My initial reaction is that classification:type": 'linear' doesn't make sense, because the data are continuous and not classified.

Maybe instead we should have a similar fields, but split off these ideas to a rendering: extension written in parallel.

My initial reaction is that classification:type": 'linear' doesn't make sense, because the data are continuous and not classified.

The example is not ideal, indeed (although 8000 may be the max value). And type may also be "continuous" instead of linear.

Maybe instead we should have a similar fields, but split off these ideas to a rendering: extension written in parallel.

It is indeed true that the color maps are more rendering, but I would not really want to duplicate the information so they'd need to be written in a way so that you could combine them, which would get difficult....

@m-mohr I made a home for color and rendering in stuff in #3

@cholmes can you provide the best example of a UDM STAC that I can use for reference?

I've never actually got to making a STAC version, it's just been on the list to try out. But you can get a sense of the fields we'll want at: https://developers.planet.com/docs/data/udm-2/

Right now it's one band per classification, but the core classifications are actually mutually exclusive, so we have an internal process that collapses them into a single band, and so I may try to use that if we make a STAC version of the data.

If you want to see a STAC Item that includes the UDM you can check out https://www.planet.com/data/stac/open-skysat-data/20201211_223832_ssc4_u0001/20201211_223832_ssc4_u0001.json but I don't know that it's all that helpful. But you can get the UDM https://storage.googleapis.com/open-cogs/planet-stac/20201211_223832_ssc4_u0001/20201211_223832_ssc4_u0001_udm2.tif

@drwelby I put together a few examples based on what I've been able to glean from this repo and links to external resources: https://gist.github.com/pjhartzell/2dff391f9787ab6c649d5961364a2118

As mentioned on the STAC call today, we are interested in getting bitmask information into the classification extension. I have some hours this week to devote to this, so happy to discuss/help/whatever.

@pjhartzell Great, thanks! I'll give it look tomorrow.

Will we provide something like classification:classes with a type of [string] for summarizing classes in Item properties or Collection summaries?

There are several examples where label:classes from the Label Extension is used for this, but it would seem that we would want to provide a complete solution here.

Also noting that classification:classes is very close to the current classification:classed term. Perhaps change to classification:categorical?

I think I've extracted all open questions into separate issues.