code: public static String formatCoordinate(double coordinate) {
      DecimalFormat decimalFormat = new DecimalFormat("0.######",
        new DecimalFormatSymbols(Locale.US));
      return String.format(Locale.US, "%s",
        decimalFormat.format(coordinate));
    }
docs: Useful to remove any trailing zeros and prevent a coordinate being over 7 significant figures.
  
  @param coordinate a double value representing a coordinate.
  @return a formatted string.
  @since 2.1.0