Zones are defined as polygons using an array of latitude and longitude coordinates. When the code is provided with a latitude and longitude location, it tests these for fit in each zone. It will either return a matching zone or an error if it is outside the bounds. It is worth having a look at the code to see the techniques used in this Event Action.