geoprimsField-grade geospatial math

Geofence around an area

A fence a set distance around a point, route, or area, with an optional inner warning fence, its area and perimeter, and any waypoint that falls outside.

Planning and education aid. Not for primary navigation. Full disclaimer

A published result changed on 2026-10-10: The geofence tool is now stable. Changelog

0.070008km²

The fence encloses 0.070008 km². 1 waypoint is outside it.

  • Caution:Outside the geofence: waypoint 3 by 12.0 m.
Flagged waypoints
WaypointStatusBeyond the fence
2past the warning fence7.8 m
3outside the geofence12.0 m
Fence perimeter
Waypoints outside
Waypoints in the warning zone
Largest measured fence error
Provenance
Computed by
drone.mission.geofence 1.0.0, core 0.1.0
Model
The fence is the round geodesic buffer of the area (geometry.buffer.geodesic): every point within the distance of it. A waypoint is outside when its geodesic distance to the area exceeds the fence distance, and by exactly the difference (Karney 2013)
Accuracy
The fence is within 0.1% of the distance or 0.5 m, as measured; waypoint distances are exact geodesic distances to the area
Notes
1 shown with the answer
Cites
Karney, C. F. F., Journal of Geodesy, Algorithms for geodesics

Something look off?

Your values

Showing an example. Change anything.
KML, KMZ, GPX, GeoJSON, CSV, WKT, or WKB — or drop it on the box. Read on this device.
KML, KMZ, GPX, GeoJSON, CSV, WKT, or WKB — or drop it on the box. Read on this device.
Run many at once from a CSV

Loading…

How we got thisFormula, worked example, sources, and proof

Model: The fence is the round geodesic buffer of the area (geometry.buffer.geodesic): every point within the distance of it. A waypoint is outside when its geodesic distance to the area exceeds the fence distance, and by exactly the difference (Karney 2013)

Accuracy: The fence is within 0.1% of the distance or 0.5 m, as measured; waypoint distances are exact geodesic distances to the area

When to use this: Use this to draw a keep-in boundary a set distance around a job site, a route, or a single point, with an optional inner warning fence. It gives the fence outline, its area and perimeter, and checks your mission waypoints, listing any that fall past a fence and by how far. The outline can go into your flight app's fence settings, if it has them, or onto a site briefing map.

Limitations: The fence is drawn in plan only; it sets no height limit and does not check airspace, terrain, or obstacles. Waypoints are tested as points, so a straight leg between two inside points can still cut across a concave edge of the fence. GPS error and wind drift are not included, so leave room for them in the distance you choose. Whether the drone obeys a fence depends on its own software.

Worked example: A 50 m fence around a field, with a waypoint 12 m outside. Source: add-drone-suite waypoint-outside-fence scenario.

You enter

Area, route, or point
40, -105 40, -104.998 40.0015, -104.998 40.0015, -105
Fence distance
50 m
Warning fence
30 m
Waypoints to check
40.00075, -104.999 39.99966, -104.999 39.999442, -104.999

You get

Fence area
0.070008 km²
Fence perimeter
0.989 km
Waypoints outside
1
Waypoints in the warning zone
1
Largest measured fence error
0.122 m

Review: Not yet independently reviewed by a Part 107 remote pilot.

Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.0.0, core 0.1.0. See this tool in the verification report.

Changes

Checked against: 20 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources