You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some subtypes such as raster-cube, vector-cube and labeled-array that don't have an encoding in JSON and with the subtypes we work around that. For examples and tests (see #204) it would be good to have a JSON encoding defined for them.
For example, raster-cube could be encoded as follows:
{"cube:dimensions": {...},// see STAC spec for details"cube:data": [...]// multi dimensional array}
Nevertheless, in raster-cube you'd have the issue that some values can't be represented (i.e. nan and +/-inf)
For example, labeled-array could be encoded as follows:
"cube:data": [...] // multi dimensional array
Nevertheless, in raster-cube you'd have the issue that some values can't be represented (i.e. nan and +/-inf)
Working with multidimension JSON arrays is probably fine for small examples and tests, but for larger cases (and to also cover nan/inf/...) you might want the option to have the cube's data as a binary blob, encoded as a string in hex or base64 for example.
Related: some notion of the data type (signed/unsigned bool/byte/int8/int/float/double/ ...) should probably be considered too
Yes, this is mostly meant for small chunks and tests. Nevertheless, the nan and +/-inf issue is somewhat a blocker for me, but we may still allow the limited JSON as a simple way of doing things and find an alternative for these special cases. Binary is also not straightforward though as you've mentioned with e.g. data types etc. If we need the data type details in the metadata though, we can just re-use what has been defined in STAC.
just a quick note (and I haven't checked if this is some kind of standardized extension) but the standard json module in python does support encoding NaN and infinity in JSON (by default):
Uh oh!
There was an error while loading. Please reload this page.
We have some subtypes such as
raster-cube
,vector-cube
andlabeled-array
that don't have an encoding in JSON and with the subtypes we work around that. For examples and tests (see #204) it would be good to have a JSON encoding defined for them.For example,
raster-cube
could be encoded as follows:Nevertheless, in raster-cube you'd have the issue that some values can't be represented (i.e. nan and +/-inf)
For example,
labeled-array
could be encoded as follows:The text was updated successfully, but these errors were encountered: