DAP4: Constraints and Shared Dimensions: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
(No difference)

Revision as of 20:21, 26 February 2012

Projections

Let us assume, for now, that the DAP4 constraint language will be closely related to the DAP2 constraint language. We will start with projections and address the issue of selections later.

As with DAP2, it can be assumed that a projection walks a path from the root dataset to some simple variable (i.e. one of a cardinal type); also, the path may be annotated with dimension ranges ([a:b:c]).

Mostly this will work fine in DAP4, except for the problem of shared dimensions. Suppose we have this case.

<Dataset name="dataset">
  <Dimensions>
    <Dimension name="lat" size="10"/>
    <Dimension name="lon" size="20"/>
  <Dimensions>
  <Variables>
    <Float32 name="lat">
      <Dimensions>
        <Dimension name="lat"/>
      </Dimensions>
    </Float32>
    <Float32 name="lon">
      <Dimensions>
        <Dimension name="lon"/>
      </Dimensions>
    </Float32>
    <Float32 name="temp">
      <Dimensions>
        <Dimension name="lat"/>
        <Dimension name="lon"/>
      <Dimensions>
      <Maps>
        <Map name="lat"/><Map name="lon"/>
      </Maps>
  </Variables>
</Dataset>

So we have an array variable (temp) with two coordinate variables (lat and lon) and shared dimensions lat and lon.

Suppose we request the following projections.

temp[0:5][2:3],lat[0:3],lon[0]

The key thing to note is that we just broke the shared dimension because the three variables no longer have the standard coordinate variable relationship. This would seem like a bad idea. The problem is further exacerbated when there are two variables such as temp and salinity that use the same or overlapping sets of coordinate variables.

The only way I can think of to handle this is to modify the projection syntax so non-anonymous (shared) dimensions ranges are specified in the projection. For example, we might write something like this.

lat=[0:5],lon=[2:3],temp[lat,lon],lat[lat],lon[lon]

or more compactly

lat=[0:5],lon=[2:3],temp,lat,lon

The assumption is, then, that the same range is used everywhere for that dimension.

Other Open Issues:

  1. Should it be possible to stop a projection path at a structure and return the whole structure instance?

-Dennis Heimbigner