001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.coor.conversion; 003 004import static org.openstreetmap.josm.tools.I18n.tr; 005 006import org.openstreetmap.josm.data.coor.ILatLon; 007 008/** 009 * Coordinate format that converts coordinates to simple floating point decimal format. 010 * @since 12735 011 */ 012public class DecimalDegreesCoordinateFormat extends AbstractCoordinateFormat { 013 014 /** 015 * The unique instance. 016 */ 017 public static final DecimalDegreesCoordinateFormat INSTANCE = new DecimalDegreesCoordinateFormat(); 018 019 protected DecimalDegreesCoordinateFormat() { 020 super("DECIMAL_DEGREES", tr("Decimal Degrees")); 021 } 022 023 @Override 024 public String latToString(ILatLon ll) { 025 return cDdFormatter.format(ll.lat()); 026 } 027 028 @Override 029 public String lonToString(ILatLon ll) { 030 return cDdFormatter.format(ll.lon()); 031 } 032}