Your rights as a photographer:
When in public spaces where you are lawfully present you have the right to photograph anything that is in plain view. That includes pictures of federal buildings, transportation facilities, and police. Such photography is a form of public oversight over the government and is important in a free society.
When you are on private property, the property owner may set rules about the taking of photographs. If you disobey the property owner’s rules, they can order you off their property (and have you arrested for trespassing if you do not comply).
Police officers may not generally confiscate or demand to view your photographs or video without a warrant.If you are arrested, the contents of your phone may be scrutinized by the police, although their constitutional power to do so remains unsettled. In addition, it is possible that courts may approve the seizure of a camera in some circumstances if police have a reasonable, good-faith belief that it contains evidence of a crime by someone other than the police themselves (it is unsettled whether they still need a warrant to view them).
Police may not delete your photographs or video under any circumstances.
Police officers may legitimately order citizens to cease activities that are truly interfering with legitimate law enforcement operations. Professional officers, however, realize that such operations are subject to public scrutiny, including by citizens photographing them.
Note that the right to photograph does not give you a right to break any other laws. For example, if you are trespassing to take photographs, you may still be charged with trespass.