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

Last change on this file since 2512 was 2114, checked in by stoecker, 15 years ago

see #3016 - patch by xeen - fixes some zooming issues

  • Property svn:eol-style set to native
File size: 1.1 KB
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
44 public double getDefaultZoomInPPD() {
45 // This will set the scale bar to about 100 km
46 return 0.009;
47 }
48}
Note: See TracBrowser for help on using the repository browser.