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