source: josm/trunk/src/org/openstreetmap/josm/data/coor/conversion/DecimalDegreesCoordinateFormat.java@ 12735

Last change on this file since 12735 was 12735, checked in by bastiK, 7 years ago

see #15229 - move CoordinateFormat code out of LatLon class

File size: 830 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.coor.conversion;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import org.openstreetmap.josm.data.coor.ILatLon;
7
8/**
9 * Coordinate format that converts coordinates to simple floating point decimal format.
10 * @since 12735
11 */
12public class DecimalDegreesCoordinateFormat extends AbstractCoordinateFormat {
13
14 public static DecimalDegreesCoordinateFormat INSTANCE = new DecimalDegreesCoordinateFormat();
15
16 private DecimalDegreesCoordinateFormat() {
17 super("DECIMAL_DEGREES", tr("Decimal Degrees"));
18 }
19
20 @Override
21 public String latToString(ILatLon ll) {
22 return cDdFormatter.format(ll.lat());
23 }
24
25 @Override
26 public String lonToString(ILatLon ll) {
27 return cDdFormatter.format(ll.lon());
28 }
29}
Note: See TracBrowser for help on using the repository browser.