View Javadoc

1   /*
2    * Trip Tracker, a real-time position tracking system for the Internet.
3    * Copyright (C) 2006  Team Trip Tracker
4    *
5    * This program is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU General Public License as published by the
7    * Free Software Foundation; either version 2 of the License, or (at your
8    * option) any later version.
9    *
10   * This program is distributed in the hope that it will be useful, but
11   * WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13   * General Public License for more details.
14   *
15   * You should have received a copy of the GNU General Public License along
16   * with this program; if not, write to the Free Software Foundation, Inc.,
17   * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
18   */
19  
20  package triptracker.core;
21  
22  public class UTMPoint {
23  
24  	private final double northing;
25  	private final double easting;
26  	private final int zoneNumber;
27  	private final char zoneLetter;
28  
29  	public UTMPoint(final double northing, final double easting,
30  			final int zoneNumber, final char zoneLetter) {
31  		this.northing = northing;
32  		this.easting = easting;
33  		this.zoneNumber = zoneNumber;
34  		this.zoneLetter = zoneLetter;
35  	}
36  
37  	@Override
38  	public String toString() {
39  		return (new StringBuilder()).append("UTMPoint[northing=").append(
40  				northing).append(",eastin=").append(easting).append(
41  				",zone_number=").append(zoneNumber).append(
42  				" zone_letter=").append(zoneLetter).append("]").toString();
43  	}
44  
45  	public double getEasting() {
46  		return easting;
47  	}
48  
49  	public double getNorthing() {
50  		return northing;
51  	}
52  
53  	public char getZoneLetter() {
54  		return zoneLetter;
55  	}
56  
57  	public int getZoneNumber() {
58  		return zoneNumber;
59  	}
60  }