Geo-Fence (Radial)

Define a geofence. Check if GPS coordinates are within that Geofence

Algorithmia Platform License · Internet Access

Try the API

{
  "unprocessed": [],
  "processed": [
    {
      "lat": 48.8640493,
      "dist_from_center": 0,
      "dist_from_fence": 150,
      "in_fence": true,
      "lon": 2.3310526
    },
    {
      "lat": 48.8640493,
      "dist_from_center": 0,
      "dist_from_fence": 150,
      "in_fence": true,
      "lon": 2.3310526
    },
    {
      "lat": 48.8640493,
      "dist_from_center": 0,
      "dist_from_fence": 150,
      "in_fence": true,
      "lon": 2.3310526
    },
    {
      "lat": 48.8640492,
      "dist_from_center": 0.011122634387089651,
      "dist_from_fence": 149.98887736561292,
      "in_fence": true,
      "lon": 2.3310526
    }
  ]
}

Install & Use

Use

curl -X POST -d '
{
	"boundary": {
		"center": {
			"gps": {
				"lat": 48.8640493,
				"lon": 2.3310526
			}
		},
		"radius": {
			"meters": 70
		}
	},

	"locations": [{
		"lat": 48.8640493,
		"lon": 2.3310526
	}, {
		"lat": 48.8640493,
		"lon": 2.3310526
	}, {
		"lat": 48.8640493,
		"lon": 2.3310526
	}, {
		"lat": 48.8640492,
		"lon": 2.3310526
	}]
}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/vagrant/AreaPolling/0.1.2