Class ncsa.horizon.coordinates.CoordTransformConstraints
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.horizon.coordinates.CoordTransformConstraints

java.lang.Object
   |
   +----ncsa.horizon.coordinates.CoordTransformConstraints

public class CoordTransformConstraints
extends Object
a description about how a CoordTransform object should be applied for transforming positions from one coordinate system to another.

An important piece of information stored in this object is an Axis Index List which specifies which axes of a coordinate system the transform should be applied to. In general, the transform usually assumes that each axis refered to in the list represents a different but particular quantity in the domain space. For instance, it may assume that the first axis in the list represents longitude. The list provides a way of telling the transform which axis is the longitude axis. The getAxisIndexList() returns this list as an array of integers where each element is an axis index. If the transform wants the first axis to be longitude and the second axis to be latitude, then this method might return an integer array = { 0, 4 }, indicating that axis number 0 is the longitude axis and axis number 4 is the latitude axis.


Variable Index

 o forward
if false, then the reverse CoordTransform should be applied.
 o indices

Constructor Index

 o CoordTransformConstraints()
create a CoordTransformConstraints with an empty Axis Index List
 o CoordTransformConstraints(int)
create a CoordTransformConstraints with an Axis Index List containing the numbers 0 through n-1 in order.
 o CoordTransformConstraints(int[])
create a CoordTransformConstraints with an initial Axis Index List specified by the given array.
 o CoordTransformConstraints(int[], boolean)
create a CoordTransformConstraints with an initial Axis Index List specified by the given array.

Method Index

 o addAxis(int)
add an axis index to the end of the list
 o getAxisIndexList()
return an array of integer indicating the indices of the axes that the transform should be applied to.
 o getIndexAt(int)
return the i-th index of the index list
 o removeAllAxes()
remove the all the axis indices in the Axis Index List.
 o removeIndexAt(int)
remove the i-th axis index from the list; all axes at positions higher that i are shifted down.
 o setAxisAt(int, int)
set the axis index at the specified position of the axis index list
 o setAxisListSize(int)
set the size of the list.

Variables

 o indices
  protected Vector indices
 o forward
  public boolean forward
if false, then the reverse CoordTransform should be applied. That is, when an object might normally call the transform's forward() method, it should instead call the reverse() method (and vice versa).

Constructors

 o CoordTransformConstraints
  public CoordTransformConstraints()
create a CoordTransformConstraints with an empty Axis Index List
 o CoordTransformConstraints
  public CoordTransformConstraints(int n)
create a CoordTransformConstraints with an Axis Index List containing the numbers 0 through n-1 in order.
 o CoordTransformConstraints
  public CoordTransformConstraints(int axes[],
                                   boolean doForward)
create a CoordTransformConstraints with an initial Axis Index List specified by the given array.
Parameters:
axes - the axis index list
doForward - false, if the transform should be applied in reverse
 o CoordTransformConstraints
  public CoordTransformConstraints(int axes[])
create a CoordTransformConstraints with an initial Axis Index List specified by the given array.
Parameters:
axes - the axis index list

Methods

 o getAxisIndexList
  public int[] getAxisIndexList()
return an array of integer indicating the indices of the axes that the transform should be applied to. This returns an array reflecting the current state of the list but with blank values removed.
 o removeAllAxes
  public void removeAllAxes()
remove the all the axis indices in the Axis Index List.
 o addAxis
  public void addAxis(int ax)
add an axis index to the end of the list
 o setAxisAt
  public void setAxisAt(int ax,
                        int i) throws ArrayIndexOutOfBoundsException
set the axis index at the specified position of the axis index list
 o getIndexAt
  public Integer getIndexAt(int i) throws ArrayIndexOutOfBoundsException
return the i-th index of the index list
Returns:
Integer the index, or null if the index is not set.
 o removeIndexAt
  public void removeIndexAt(int i)
remove the i-th axis index from the list; all axes at positions higher that i are shifted down.
 o setAxisListSize
  public void setAxisListSize(int size)
set the size of the list. This does not guarantee the size of the array returned by getAxisIndexList(). This method is mainly provided as a way of reducing the size of the list, removing axes from the end.

All Packages  Class Hierarchy  This Package  Previous  Next  Index