You have to precisely explain what you want and what problems you face/see.
I think it can be done in the following way:
When a unit is ordered to build, then get the x/y location, and check if there is a road around.
You can store every buildings width and lenght, so you know the offeset x/y.
Example:
Barrack = 128x128
Town Hall = 256x256
Road = 64x64
If you place a barrack, the offest may be 128/2 + 64/2 of the builded location.
If there is no road arround, then cancel the build order.
This is the less accurate way as I mentioned above.
The building could be built over the road using this method.
Will not work as that detects circular areas not square areas like terrain / buildings.If you place a barrack, the offest may be 128/2 + 64/2 of the builded location.
Locust is not the point here. That does make a unit unselectable. But if you make the roads units with a model you are looking at a ton of units which would cause lag.
If you change the terrain it is much more efficient and no chance at lag since terrain is always loaded.
You could place building on the road and units can walk on it this way.
To counter the building being placed on the road you need to detect the roads around the building trying to be built. You then need to check to see if the building and the road intersect.
Using the simple method you suggested above.
Will not work as that detects circular areas not square areas like terrain / buildings.
With the method above you could store into a hashtable the position of the terrain tile. And with what player owns that road.
You can easily delete the road as all you need to do is make an ability that selects a point. Then check if a road is there. Check if it is owned by the player activating the ability. Then remove it.