I want to define a geographical boundary outside of which, the app will refuse to work. I already know how to do this with a square bound by two lat/long pairs:

```
 if ((dLAT.doubleValue() > 35.309171) || (dLAT.doubleValue() < 35.226442) || (dLON.doubleValue() < -92.790165) || (dLON.doubleValue() > -92.707081))
    {
        LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(this);

        localBroadcastManager.sendBroadcast(new Intent("killapp"));
    }

```

I also know about geofencing... or enough to know that with geofencing, areas are defined as circles with a radius from a single point.

But like I said I would like to define a boundary that matches reality:

For example, if there was an app that was designed NOT to work if the user is outside the border of Kansas, it would not be satisfactory to define a RADIUS, as the state of Kansas is not circular, and its border is wiggly.

I happen to be using Android for this, but I doubt that really matters for this question.

Thanks for any help!