String urLat = request.getParameter("urLat");
String urLon = request.getParameter("urLon");
if (llLat != null && llLon != null && urLat != null && urLon != null) {
try {
LatLonRect bbox = new LatLonRect(new LatLon(
Double.parseDouble(llLat), Double.parseDouble(llLon)),
new LatLon(Double.parseDouble(urLat), Double.parseDouble(urLon)));
beforeTime = System.currentTimeMillis();
results = tree.queryByBoundingBox(bbox);
afterTime = System.currentTimeMillis();
// get the polygon that approximates the region
Rectangle2D[] rects = bbox.getJavaRectangles();
for (int i = 0; i < rects.length; i++) {
String regionStr = (rects[i].getMinY() - 90) + ","
+ (rects[i].getMinX() - 180) + ",";
regionStr += (rects[i].getMaxY() - 90) + ","
+ (rects[i].getMinX() - 180) + ",";