Combine this spell with Spectral hand and affect any stone within 100ft +10ft/lvl. Then you can create those spiked walls, cover over arrow slits and murder holes, etc at range.
I would probably limit structures you could create to fairly large shapes (no smaller than a 3-4 inches in thickness/diameter, meaning only one spike per 5 or 10 cubic feet, depending on length), personally, per the "crude shapes" argument, but I see no reason you couldn't make terrain that was the equivalent of an immovable area of caltrops (5 ft square per 10 cubic feet) or trap an opponent with a cage of arm-thick columns (though I would allow them a reflex save to escape as the cage was forming).
A large spike I would allow to deal dmg as a spear that had been braced against a charge if you took the readied action to cast the spell, but it would still require an attack to hit them. However, you could reasonably make a stone ceiling or stalactite cave in with this method as well, dealing falling dmg (1/2 or none on a successful reflex, depending on size) and potentially burying them in the process.
Probably more useful if you were eon a battle field, though, would be if you could use this to make a trebuchet (essentially a counter-weighted lever system) in an instant and start hurling small boulders or scatter shot at your opponents on a battlefield. You can take out any siege engines they might have brought before they can ready them while attacking their squadrons at the same time. Form it in two parts, the base and the arm, so that one just sits on top of the other and the whole mechanism is so simple that most DMs would probably reduce, if not waive, the failure chance for moving parts. And who cares if they destroy one or two of these when it only takes a single spell to recreate them from scratch.
And note that some smaller historical trebuches actually functioned mechanically more like catapults, so why not ask your DM if you can switch between those two rule sets? Gives you a better range of attack options for mid and long range, and the worst thing your DM might say is "No".
P.S. Don't forget to summon small earth (or titanium) elementals for ammunition. Just remind them to earth glide into the ground when they hit so they can keep attacking from below. ;P