DAP4: Constraints and Shared Dimensions: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
Line 1: Line 1:
== Projections ==
== 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.
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.
<pre>
<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>
</pre>
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.
<pre>
temp[0:5],lat[0:3],lon[0]
</pre>
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. What
Open Issues:
# Should it be possible to stop a projection path at a structure and return the whole structure instance?
''-Dennis Heimbigner''

Revision as of 20:11, 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],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. What

Open Issues:

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


-Dennis Heimbigner