Closed gadomski closed 1 year ago
_
is included in \w
in the regex, so users have the option to choose -
or _
.
A related question is: Should there be a human-readable title for e.g. legens?
Adding an optional title
to classes seems useful.
Is there a better name for name
that hints that it's machine-readable? Maybe classname
?
I think name
is fine for this.
Background
Currently, the
name
attribute of the class object is defined asThere is no additional guidance around what "machine readibility" [sic] means. This is true for the
name
field of the bit field object as well.(aside) I've opened a PR to fix the spelling of
readibility
here:Previous discussion
This issue has been discussed in two spots:
We have identified at least three ways the
name
field is used in the wild (so far):GET /api/stats/landcover?class=snow
if not tile.land_cover.snow
These each indicate that
name
should be short, and that it should be ready for simple string manipulation operations that convert it from (e.g.)snake_case
toLegend case
(a nice, human readable version for map legends).Proposal
While I personally prefer
kebab-case
, STAC preferssnake_case
, so I propose thatname
is restricted tosnake_case
and checked in the schema w/ a regex, per @m-mohr's suggestion here (but changing-
to_
): https://github.com/stac-extensions/classification/pull/35#issuecomment-1185762981. Thoughts?