Well, alot of the liability depends on prior warning.
A set gun aimed at a window is considered a boobytrap and will get your ass in prison quick, regardless of the fact that a burglar would be the only person setting it off.
But, if there's clear warning of a hazard and the nature of the hazard, no "innocent" people can stumble across it (fencing), then your liability is greatly reduced.
Its like an electrical substation: Fenced off, barbed wire, signs warning of lethal electrical shock. Someone climbs in and gets zapped, the utilities aren't responsible.
If you had a bare wire running along the top of your fence that would kill the same way with no such precautions, then you've set a trap and are liable.
I'd imagine if you had a fenced off property with signs every 20 yards saying "DANGER! Ground Spikes!" (english and the local non-english language) with a drawing of a foot being impaled on a caltrop, then you've given adequate warning.
I'd imagine your reasons for having such things would have to be considerable though. Perhaps a car impound lot could justify it to prevent car theft, a house owner......hmmmm.
If you just wish to prevent tresspasser from driving on your road, you could buy one of those spike things that are at parking lots. They have retractable versions.