code: public static void writeGeoJson(Connection connection, String fileName, String tableReference, String encoding) throws IOException, SQLException {
          GeoJsonDriverFunction geoJsonDriver = new GeoJsonDriverFunction();
          geoJsonDriver.exportTable(connection,tableReference, URIUtilities.fileFromString(fileName), new EmptyProgressVisitor(),encoding);
      }
docs: Write the GeoJSON file.
  
  @param connection
  @param fileName
  @param tableReference
  @param encoding
  @throws IOException
  @throws SQLException