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
;
11 * @version $Id: BoundingBox.java 2471 2007-07-31 21:50:57Z tgaskins $
13 public class BoundingBox
23 public static BoundingBox
createFromStrings(String crs
, String minx
, String maxx
, String miny
, String maxy
,
24 String resx
, String resy
)
26 BoundingBox bbox
= new BoundingBox();
31 bbox
.minx
= Double
.parseDouble(minx
);
32 bbox
.maxx
= Double
.parseDouble(maxx
);
33 bbox
.miny
= Double
.parseDouble(miny
);
34 bbox
.maxy
= Double
.parseDouble(maxy
);
35 bbox
.resx
= resx
!= null && !resx
.equals("") ? Double
.parseDouble(resx
) : 0;
36 bbox
.resy
= resy
!= null && !resy
.equals("") ? Double
.parseDouble(resy
) : 0;
38 catch (NumberFormatException e
)
48 public String
getCrs()
53 public double getMinx()
58 public double getMaxx()
63 public double getMiny()
68 public double getMaxy()
73 public double getResx()
78 public double getResy()
84 public String
toString()
86 StringBuilder sb
= new StringBuilder();
89 sb
.append(": minx = ");
91 sb
.append(" miny = ");
93 sb
.append(" maxx = ");
95 sb
.append(" maxy = ");
97 sb
.append(" resx = ");
99 sb
.append(" resy = ");
100 sb
.append(this.resy
);
102 return sb
.toString();