(sorry if this is old news...)
Ever make a map where you have the player command a unit which can burrow and you really wanted to know if it was or wasn't?
Well here is how, it's quite simple, but NOT 100% foolproof. Trying to achieve that 100% may be possible.. but it's not worth the extra time/triggers
Basically we have a buoy which we move back and forth, if the unit is burrowed the buoy will be able to step on a small location (16x16) which follows the host, otherwise it won't step on it and we know the unit is unburrowed.
We can take into account units that go over top the unit as it's burrowed, but it becomes impossible to tell that when the unit over top can potentially also be burrowed.
Basically you can always tell when your unit burrows, but it's not always easy to tell when the unit unburrows, which is why you should make it have some sort of action or special burrow ability which will ultimately result in it unburrowing.
Example:
For one of my maps I have a defiler which has a % chance to get a broodling when it burrows, it unburrows automatically.
The map provides the bare minimum you need, and also features the oil rig type terrain

, enjoy.
Tip: There is a small difference between create and move. Create will place burrowed units around an normal unit as if they took up space. Move will move burrowed units under other units. Also to avoid a nasty ERROR PLACEMENT MESSAGE you should pre-create units in an separate area of the map, then try to move them to where you want them.