Detection of buildings

Is there any way to detect if I am near a Building or not considering my position?
Thanks.