* DataBounds interface method, although this object doesn't
* implement the complete interface because it doesn't have a
* name.
*/
public DataBounds getDataBounds() {
DataBounds box = null;
double minx = 180;
double miny = 90;
double maxx = -180;
double maxy = -90;
boolean set = false;
List asrps = getASRPDirs();
for (Iterator it = asrps.iterator(); it.hasNext();) {
OMRect rect = ((ASRPDirectory) it.next()).getBounds();
float n = rect.getNorthLat();
float s = rect.getSouthLat();
float w = rect.getWestLon();
float e = rect.getEastLon();
if (n < miny)
miny = n;
if (n > maxy)
maxy = n;
if (s < miny)
miny = s;
if (s > maxy)
maxy = s;
if (w < minx)
minx = w;
if (w > maxx)
maxx = w;
if (e < minx)
minx = e;
if (e > maxx)
maxx = e;
set = true;
}
if (set) {
box = new DataBounds(minx, miny, maxx, maxy);
if (Debug.debugging("asrp")) {
Debug.output("ASRPDirectoryHandler.getDataBounds(): "
+ box.toString());
}
}
return box;
}