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

Last change on this file since 2103 was 2017, checked in by Gubaer, 15 years ago

removed OptionPaneUtil
cleanup of deprecated Layer API
cleanup of deprecated APIs in OsmPrimitive and Way
cleanup of imports

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