Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.coor.conversion;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import org.openstreetmap.josm.Main;
|
---|
7 | import org.openstreetmap.josm.data.coor.ILatLon;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * Coordinate format that projects a coordinate and returns northing and easting in
|
---|
11 | * decimal format.
|
---|
12 | * @since 12735
|
---|
13 | */
|
---|
14 | public class ProjectedCoordinateFormat extends AbstractCoordinateFormat {
|
---|
15 |
|
---|
16 | /**
|
---|
17 | * The unique instance.
|
---|
18 | */
|
---|
19 | public static final ProjectedCoordinateFormat INSTANCE = new ProjectedCoordinateFormat();
|
---|
20 |
|
---|
21 | protected ProjectedCoordinateFormat() {
|
---|
22 | super("EAST_NORTH", tr("Projected Coordinates"));
|
---|
23 | }
|
---|
24 |
|
---|
25 | @Override
|
---|
26 | public String latToString(ILatLon ll) {
|
---|
27 | return cDdFormatter.format(ll.getEastNorth(Main.getProjection()).north());
|
---|
28 | }
|
---|
29 |
|
---|
30 | @Override
|
---|
31 | public String lonToString(ILatLon ll) {
|
---|
32 | return cDdFormatter.format(ll.getEastNorth(Main.getProjection()).east());
|
---|
33 | }
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.