CoordinateSystem class thoughts

A RealTupleType ?has-a? default Coordinate System. What does that mean? If
you think of a coordinate system as a ?way of naming the elements in a set?,
and a RealTupleType is Rn, then the product of the coordinates on each
component is a coordinate system, and the obvious ?default?.
(see http://www.unidata.ucar.edu/staff/caron/CoordMath2.htm )

We do need a reference coordinate system, and a way to transform between the
coordinate system defined by the RealTupleType and the reference coordinate
system.  The CoordinateSystem class thus is defined for that purpose, adding
coordinate transform methods.  A RealTupletype and its CoordinateSystem are
pretty intimately connected, otherwise the transform will be wrong. So why
are they separate?   I think that Bill?s design factors out the Units
transformation, so that RealTupletypes with different units can share the
same CoordinateSystem. Also you might want to define a RealTupleType without
defining a reference coord system.

The DefaultCoordinateSystem then doesn?t "actually" define the default
coordinate system, but rather the transformation of the default to a
reference coord system. CoordinateSystem might be better named
CoordinateTransformation or something like that. The coordinate system is
actually the RealTupleType .  From that perspective, it makes sense that a
CoordinateTransformation (aka CoordinateSystem) object ?has-a? reference
RealTupleType (which is really a coordinate system).

Now if that?s true, the CoordinateTransformation (aka CoordinateSystem) is
bound to its reference RealTupleType. Yet the reference is passed in at
initialization, rather than being a final static field in the class.  But if
you look at SphericalCordinateSystem.java, that field in never used and the
method toReference() assumes yoe are converting to the cartesian coord
system.

 It?s possible (likely?) I?m missing something, but to finish where this
direction is going:

1) Since coordinate transformations are functions that depend on both domain
and range coordinate systems, you have to define them at compile time (by
coding up the correct methods), so the toReference() methods are really
class methods, and no reference field should be passed in to the
initializer.

 2) It doesn?t appear that there is any chaining of coord transformations,
and there?s likely a way to do so if we needed that.



  • 1998 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: