A geofence is a virtual fence or perimeter around a physical location . Like a real fence, a geofence creates a separation between that location and the area around it. Unlike a real fence, it can also detect movement inside the virtual boundary. It can be any size or shape, even a straight line between two points.