Inclusion functions or boundary functions

Has anyone developed inclusion or boundary functions?
For example:

             which are the objects that are inside an area?

or

             which are the objects that are close to the boundary
             of an area?
             
Thanks to all!

   Rita Bucciantini.