yeah its illegal, but as long as you do it in a spot that you know for sure has been deserted for a long time, you should be fine. if anything, it'll just get torn down.
i really wish i had an abandoned spot next to my house, because i really want to make a quarter.