Package uk.ac.starlink.ttools.plot2
Interface DataGeom
-
- All Known Implementing Classes:
CubeDataGeom
,HealpixDataGeom
,PlaneDataGeom
,SkyDataGeom
,SliceDataGeom
,SphereDataGeom
,TimeDataGeom
@Equality public interface DataGeom
Translates the coordinates found in a Tuple to data space coordinates. It also contains metadata about the coordinates to assist in generating a UI to acquire them.- Since:
- 11 Feb 2013
- Author:
- Mark Taylor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getDataDimCount()
Returns the dimensionality of the plot surface's plot space.Coord[]
getPosCoords()
Returns the definitions for the user-supplied coordinates that indicate plot positions.java.lang.String
getVariantName()
Returns a label for this DataGeom.boolean
readDataPos(Tuple tuple, int icol, double[] dpos)
Determines the positional coordinates in data space for a supplied tuple.
-
-
-
Method Detail
-
getDataDimCount
int getDataDimCount()
Returns the dimensionality of the plot surface's plot space.- Returns:
- number of elements in data space coordinate array
-
getPosCoords
Coord[] getPosCoords()
Returns the definitions for the user-supplied coordinates that indicate plot positions.- Returns:
- coordinate quantity array for this geometry
-
readDataPos
boolean readDataPos(Tuple tuple, int icol, double[] dpos)
Determines the positional coordinates in data space for a supplied tuple.A parameter supplies the index of the field in the tuple at which the positional coordinate(s) can be found. Each position is represented by
getPosCoords()
columns of the tuple. By convention positions are at the start of the tuple, so if there is one position in the tuple it will be at icol=0, and there are multiple positions the N'th one will be at icol=N*getPosCoords().An array of (at least)
getDataDimCount()
elements is supplied, and on success the data space coordinate values are written into it.- Parameters:
tuple
- coordinate tupleicol
- column index intuple
at which the positional information startsdpos
- array into which data space coordinates are written- Returns:
- true iff conversion was successful
-
getVariantName
java.lang.String getVariantName()
Returns a label for this DataGeom. It may be used to distinguish from other geoms used in the same plot type, so for instance call it "Cartesian" or "Polar" rather than "Plane" if it's X,Y.- Returns:
- user-directed input coordinate type name
-
-