2 Copyright (C) 2001, 2006 United States Government
3 as represented by the Administrator of the
4 National Aeronautics and Space Administration.
7 package gov
.nasa
.worldwind
.wms
;
13 * @version $Id: BoundingBox.java 1986 2007-06-09 00:33:50Z tgaskins $
15 public class BoundingBox
25 public static BoundingBox
createFromStrings(String crs
, String minx
, String maxx
, String miny
, String maxy
,
26 String resx
, String resy
)
28 BoundingBox bbox
= new BoundingBox();
33 bbox
.minx
= Double
.parseDouble(minx
);
34 bbox
.maxx
= Double
.parseDouble(maxx
);
35 bbox
.miny
= Double
.parseDouble(miny
);
36 bbox
.maxy
= Double
.parseDouble(maxy
);
37 bbox
.resx
= resx
!= null && !resx
.equals("") ? Double
.parseDouble(resx
) : 0;
38 bbox
.resy
= resy
!= null && !resy
.equals("") ? Double
.parseDouble(resy
) : 0;
40 catch (NumberFormatException e
)
50 public String
getCrs()
55 public double getMinx()
60 public double getMaxx()
65 public double getMiny()
70 public double getMaxy()
75 public double getResx()
80 public double getResy()
86 public String
toString()
88 StringBuilder sb
= new StringBuilder();
91 sb
.append(": minx = ");
93 sb
.append(" miny = ");
95 sb
.append(" maxx = ");
97 sb
.append(" maxy = ");
99 sb
.append(" resx = ");
100 sb
.append(this.resx
);
101 sb
.append(" resy = ");
102 sb
.append(this.resy
);
104 return sb
.toString();