Rev | Line | |
---|
[12735] | 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.data.coor.ILatLon;
|
---|
| 7 |
|
---|
| 8 | /**
|
---|
| 9 | * Coordinate format that converts coordinates to simple floating point decimal format.
|
---|
| 10 | * @since 12735
|
---|
| 11 | */
|
---|
| 12 | public class DecimalDegreesCoordinateFormat extends AbstractCoordinateFormat {
|
---|
| 13 |
|
---|
[12741] | 14 | /**
|
---|
| 15 | * The unique instance.
|
---|
| 16 | */
|
---|
[12739] | 17 | public static final DecimalDegreesCoordinateFormat INSTANCE = new DecimalDegreesCoordinateFormat();
|
---|
[12735] | 18 |
|
---|
[12738] | 19 | protected DecimalDegreesCoordinateFormat() {
|
---|
[12735] | 20 | super("DECIMAL_DEGREES", tr("Decimal Degrees"));
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | @Override
|
---|
| 24 | public String latToString(ILatLon ll) {
|
---|
| 25 | return cDdFormatter.format(ll.lat());
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | @Override
|
---|
| 29 | public String lonToString(ILatLon ll) {
|
---|
| 30 | return cDdFormatter.format(ll.lon());
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.