opengeospatial / CoverageJSON

Public repo for CoverageJSON project
Apache License 2.0
10 stars 8 forks source link

Further modifications to NdArray specification #76

Closed jonblower closed 2 years ago

jonblower commented 2 years ago

I realised that the latest changes to the NdArray specification are not compatible with some of the Playground examples. Given that some users may have based their own CoverageJSON documents on these examples, I thought it was better not to break them.

I think we have to permit "zero dimensional" arrays after all, but perhaps we can clarify that this means that:

I think the modification we recently made to the Domain definition is still valid, because I think it's still true that a Domain must have at least one axis.

What do you think, @letmaik?

I also realised that I don't think we define how Domains and NdArrays need to relate to each other. I think the rules are:

Do we need to define the above anywhere?

letmaik commented 2 years ago

Ah shoot, you're right, I didn't think about the Point case.

I agree that the Domain changes are still valid. I would just revert the NdArray changes without extra clarifications, to me at least the two bullets about shape and axisNames are clear enough.

Regarding the relation between Domain and NdArray there's this text within Coverage:

A coverage object MUST have a member with the name "ranges" where the value is a range set object. Any member of a range set object has as name any of the names in a "parameters" object in scope and as value either an NdArray or TiledNdArray object or a URL resolving to a CoverageJSON document of such object. [...] The shape and axis names of each NdArray or TiledNdArray object MUST correspond to the domain axes defined by "domain", while single-valued axes MAY be omitted.

This corresponds to your three bullet points, right?

jonblower commented 2 years ago

OK great, I'll revert the NdArray changes. The only thing I wasn't clear about with the original NdArray text was whether a 0D array must have exactly one data value. I might add a sentence to that effect.

This corresponds to your three bullet points, right?

Yes, I think that covers it, thanks

jonblower commented 2 years ago

Addressed in https://github.com/opengeospatial/CoverageJSON/pull/77

jerstlouis commented 2 years ago

@chris-little @jonblower

Ah shoot, you're right, I didn't think about the Point case.

I was thinking about that when that was brought up and was slightly concerned. Glad that 0D is back in :)

jonblower commented 2 years ago

@jerstlouis A Point would still have been possible in the >=1D case. There could be 4 axes, each of which has a single value, leading to a single-valued NdArray.

The problem is that we also allow single-valued dimensions to be omitted from the NdArray (although they must still be present in the Domain). So some older CoverageJSON documents (legally) use a 0D NdArray with a 4D Domain and we didn't want to break backward compatibility.

In general, there is a distinction between the dimensionality of the coordinate space and the dimensionality of the geometry within it. E.g. it's possible to have a 0D geometry (a point) or a 1D geometry (trajectory) in a 4D coordinate space (domain).

chris-little commented 2 years ago

agreed to merge at 2022-05-18