    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.

##

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

##

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

##

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

##

indices

      protected Vector indices

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).

##

CoordTransformConstraints

      public CoordTransformConstraints()

  create a CoordTransformConstraints with an empty Axis Index List

CoordTransformConstraints

      public CoordTransformConstraints(int n)

  create a CoordTransformConstraints with an Axis Index List containing the numbers 0 through n-1 in order.

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

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

##

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.

removeAllAxes

      public void removeAllAxes()

  remove the all the axis indices in the Axis Index List.

addAxis

      public void addAxis(int ax)

  add an axis index to the end of the list

setAxisAt

      public void setAxisAt(int ax,
                            int i) throws ArrayIndexOutOfBoundsException

  set the axis index at the specified position of the axis index list

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.

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.

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