California cops will soon be required to document and make public the ethnicity and race of individuals they stop while patrolling — and they're not happy about it.

Civil rights groups praised the sweeping racial profiling bill signed into law this weekend by Governor Jerry Brown, but the law enforcement community claims it will unduly burden officers. The law, called the Racial and Identity Profiling Act of 2015, requires departments to log data for each stop of a citizen, including the time, date, location, and reason, as well as the "perceived race or ethnicity, gender, and approximate age of the person stopped," and whether the officer took any actions or searched the person.

The data will be turned over to the state attorney general and a Racial and Identity Profiling Board that will oversee the law. The data will also be made public.

"Racial or identity profiling is a practice that presents a great danger to the fundamental principles of our Constitution and a democratic society. It is abhorrent and cannot be tolerated," the legislators, including bill sponsor Shirley Weber, wrote in the bill. "Racial or identity profiling alienates people from law enforcement, hinders community policing efforts, and causes law enforcement to lose credibility and trust among the people whom law enforcement is sworn to protect and serve."

Trineka Greer, spokeswoman for the advocacy group PICO California, said the law would give the state and the public the ability to see for themselves whether police departments were using bias in their stops, rather than taking the agencies at their word. PICO was part of a coalition of groups including the ACLU and Youth Justice Coalition that held rallies outside of Brown's office in recent days urging him to sign it.

"We hope to be able to use the data to suss out rogue individuals and sometimes entire departments that operate with the standard that racial profiling is okay," Greer said. "We hope to use the data to make change, to suggest training, or get rid of people, or restructure departments as needed."

California police unions came out in force against the bill, with one spokesperson, Lieutenant Steve James of the Long Beach Police Officers Association and the national trustee for the California Fraternal Order of Police, telling the Los Angeles Times that, "There is no racial profiling. There just isn't. There is criminal profiling that exists."

The police unions did not respond to VICE News' requests for interviews, but statements and letters released by them in recent days outline their objections to the bill.

"If you think about it, this bill actually encourages racial profiling by requiring officers to report what they perceive to be the race, ethnicity, gender and age of the person they stopped," California Fraternal Order of Police President Roger Mayberry said in a statement. "The information to be reported to the Attorney General's office would be based on the officer's perception and not the actual information provided by the person stopped."

Mayberry said police officers should be out in communities doing police work, not doing paperwork at the station. "The public confidence will not rebound with our rank and file if they are not seen in the community maintaining our public safety," he said.

In a letter to Brown urging him to veto the bill, Mayberry cited the "significant costs that must be absorbed by each local law enforcement agency for the data collection, reporting, and retention requirements prescribed by this bill." He also criticized the formation of the RIPA oversight board, arguing that a board of 19 members with only four representatives from law enforcement would result in regulations that are out of touch and burdensome to departments.

"RIPA policies and recommendations will do nothing more than unnecessarily interfere and burden law enforcement with unrealistic expectations and policies," Mayberry wrote.

'If you think about it, this bill actually encourages racial profiling.'

But both advocates and criminal justice experts say that despite the police unions' opposition, the data could actually benefit cops. Without data, a police department's claim of nondiscrimination doesn't hold much water, and neither does the public's claim of profiling, said David Harris, an expert in police behavior at Pittsburgh University School of Law. As a public institution, the agencies should be willing to examine whether their methods are effective and/or biased, he said.

"This collection of information, depending on how it is all broken out, should enable any individual police department to know whether it has any potential problems and to fix those problems. It also enables the police department to say to public, look, we looked at the data and no we don't have this problem. Without the data you can't do any of these things," he said.

Greer, the PICO California spokeswoman, said that if racial profiling really isn't an issue for California cops, they should have a problem documenting their encounters with the public.

"We all know racial profiling is an issue," she said. "If you are black or Latino or indigenous, you know you're likelihood of getting stopped is much greater than white people. Every time we have the data provided, it tells the same story."

Harris, meanwhile, dismissed the claims that the paperwork would be too burdensome or that the law will force officers who previously weren't thinking about race to stop being colorblind.

"What you actually want is to find out what the officer perceives the race or ethnicity to be, because that is what might be motivating the improper stops," he said. "The actual race is irrelevant."

The bill will be rolled out over the next five years depending on the size of the police department. Greer called the legislation "historic," and said she hopes it will inspire similar laws across the country "so no longer will people and communities of color expect to be terrorized in their communities."

"Law enforcement agents are sworn to protect everybody, including black people, Latino people, and indigenous people, and they have to build trust between the community and law enforcement to allow them to do their job," she said. "This is a mechanism by which we can begin to build that trust."