source: josm/trunk/src/org/openstreetmap/josm/data/projection/Epsg4326.java@ 1032

Last change on this file since 1032 was 1032, checked in by mfloryan, 16 years ago

Fixed some messages that were not translatable.

  • Property svn:eol-style set to native
File size: 935 bytes
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.data.projection;
3import static org.openstreetmap.josm.tools.I18n.tr;
4import org.openstreetmap.josm.data.coor.LatLon;
5import org.openstreetmap.josm.data.coor.EastNorth;
6
7/**
8 * Directly use latitude / longitude values as x/y.
9 *
10 * @author imi
11 */
12public class Epsg4326 implements Projection {
13
14 public EastNorth latlon2eastNorth(LatLon p) {
15 return new EastNorth(p.lon(), p.lat());
16 }
17
18 public LatLon eastNorth2latlon(EastNorth p) {
19 return new LatLon(p.north(), p.east());
20 }
21
22 @Override public String toString() {
23 return tr("EPSG:4326");
24 }
25
26 public String getCacheDirectoryName() {
27 return "epsg4326";
28 }
29
30 public double scaleFactor() {
31 return 1.0/360;
32 }
33
34 @Override public boolean equals(Object o) {
35 return o instanceof Epsg4326;
36 }
37
38 @Override public int hashCode() {
39 return Epsg4326.class.hashCode();
40 }
41}
Note: See TracBrowser for help on using the repository browser.