Is there a way to query area type based on location (e.g. Road, Water, Building)

Hi,

I am wondering if there is an open geo data source that may return the type of area given a location? i.e. a type of meta-data of the location.

The use case would be clicking on a location on a map and having a response returned saying something like:

-"you have clicked on a road"
-"you have clicked on a building"
-"you have clicked on water"
-"you have clicked on <unknown>"

My initial feeling is there may be a way to do this especially considering that something like Open street map would need to know how to color each tile based on what object it is drawing.

Any ideas?

Perhaps I should have googled more before posting. This seems like it could do the trick.

http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide