class LatLonFormatter {

    public Object format(Object cellValue, SpecialKey key)
    {
        Object value = cellValue;

        if (cellValue instanceof Double)
        {
            double decimalDegrees = ((Double)cellValue).doubleValue();
            if (LatLonFormat.DMS == myExportModel.getSelectedLatLonFormat())
            {
                value = key instanceof LatitudeKey ? LatLonAlt.latToDMSString(decimalDegrees, 3)
                        : LatLonAlt.lonToDMSString(decimalDegrees, 3);
            }
            else if (LatLonFormat.DMS_CUSTOM == myExportModel.getSelectedLatLonFormat())
            {
                value = key instanceof LatitudeKey ? LatLonAlt.latToDMSString(decimalDegrees, 0, '.', '.', ' ')
                        : LatLonAlt.lonToDMSString(decimalDegrees, 0, '.', '.', ' ');
            }
        }

        return value;
    }

    public  LatLonFormatter(ExportOptionsModel exportModel);

}