code: public static String formatLongitude(final Longitude longitude,
                                         final PointLocationFormatType formatType)
      throws FormatterException
    {
      if (longitude == null)
      {
        throw new FormatterException("No point location provided");
      }
      if (formatType == null)
      {
        throw new FormatterException("No format type provided");
      }
  
      final String formatted;
      switch (formatType)
      {
        case HUMAN_LONG:
          formatted = longitude.toString();
          break;
        case HUMAN_MEDIUM:
          formatted = formatLongitudeHumanMedium(longitude);
          break;
        case LONG:
          formatted = formatLongitudeLong(longitude);
          break;
        case MEDIUM:
          formatted = formatLongitudeMedium(longitude);
          break;
        case SHORT:
          formatted = formatLongitudeShort(longitude);
          break;
        case DECIMAL:
          formatted = formatLongitudeWithDecimals(longitude);
          break;
        default:
          throw new FormatterException("Unsupported format type");
      }
      return formatted;
  
    }
docs: Formats a longitude as an ISO 6709 string.
  
  @param longitude
  Longitude to format
  @param formatType
  Format type
  @return Formatted string
  @throws FormatterException
  On an exception