/** * This file is part of Amenity Editor for OSM. * Copyright (c) 2001 by Adrian Stabiszewski, as@grundid.de * * Amenity Editor is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Amenity Editor is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Amenity Editor. If not, see <http://www.gnu.org/licenses/>. */ package org.osmtools.api; public class BoundingBox { private double west = 180; private double east = -180; private double north = -90; private double south = 90; public double getWest() { return west; } public void setWest(double west) { this.west = west; } public double getEast() { return east; } public void setEast(double east) { this.east = east; } public double getNorth() { return north; } public void setNorth(double north) { this.north = north; } public double getSouth() { return south; } public void setSouth(double south) { this.south = south; } public void addPoint(double lon, double lat) { west = Math.min(west, lon); east = Math.max(east, lon); south = Math.min(south, lat); north = Math.max(north, lat); } }