Carry a spare card or two with you at all times when out photographing.
If the police do force you to delete your photographs, (which they can't without a court order) delete the photographs, (
do not format the card) then remove the card and replace it with the spare card.
When you get home, do a search on the net for a file recovery programme,
(I use the free programme Recuva from
http://www.piriform.com/recuva).
If all goes well, you dhould be able to recover all the photographs that you deleted.