* if known, otherwise return the coordinates of the first row, or null
* if there are no world coordinates available.
*/
public WorldCoordinates getWCSCenter() {
if (_queryArgs != null && _queryArgs.getRegion() != null) {
Coordinates pos = _queryArgs.getRegion().getCenterPosition();
if (pos instanceof WorldCoordinates) {
return (WorldCoordinates) pos;
}
}
int nrows = getRowCount();
if (nrows != 0) {
RowCoordinates rowCoordinates = getRowCoordinates();
if (rowCoordinates != null && rowCoordinates.isWCS()) {
Vector dataVec = getDataVector();
Vector rowVec = (Vector) dataVec.get(0);
Coordinates pos = rowCoordinates.getCoordinates(rowVec);
if (pos instanceof WorldCoordinates) {
return (WorldCoordinates) pos;
}
}
}