DePrimo said buying the boots "was something I had to do." He tried to persuade the man to get something to eat, but he declined and left.
"When I brought out the shoes, it was just a smile from ear to ear," he said. "It was a great moment for both of us."
DePrimo said he only told his family about the incident at the time, and was surprised when a friend told him the photo was posted on the Internet some time later.
Foster, who is a dispatch manager at the Pinal County Sheriff's Office, said she's worked in law enforcement for 17 years and has never been more impressed.
"His presentation of human kindness has not been lost on myself or any of the Arizona law enforcement officials with whom this story has been shared," Foster wrote on Facebook. She said she never got the officer's name.
DePrimo said he has been on the NYPD for 2½ years. He is assigned to the Sixth Precinct, encompassing Greenwich Village and the West Village, and lives on Long Island with his parents.
He said he keeps the receipt from the boots in his bullet-proof vest, as a reminder that even when things are tough, some people have it tougher.
NYPD Facebook page: