Skip to content
HALOWERK

Ortwerk

geofence events

Takes a track (GPX or point list with optional timestamps) and polygon fences (GeoJSON Feature/FeatureCollection with Polygon or MultiPolygon; id from feature id, properties.id or properties.name). For each fix the inside state is computed with turf booleanPointInPolygon (boundary counts as inside). With interpolation, every track segment is intersected with the fence boundary (turf lineIntersect), so crossings between fixes, including passes through a fence without any fix inside, become.

POST https://ort.halowerk.com/v1/geofence-events

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
gpxstringNoGPX track.
pointsarrayNoAlternative: ordered fixes.
fencesobjectYesGeoJSON Feature or FeatureCollection of Polygon/MultiPolygon fences (max 500).
interpolatebooleanNoInterpolate boundary crossings between fixes.
min_dwell_snumberNoDiscard visits shorter than this (needs timestamps).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "fences"
  ],
  "properties": {
    "gpx": {
      "type": "string",
      "maxLength": 6000000,
      "description": "GPX track."
    },
    "points": {
      "type": "array",
      "minItems": 2,
      "maxItems": 100000,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "lat",
          "lon"
        ],
        "properties": {
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude in WGS84 degrees."
          },
          "lon": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude in WGS84 degrees."
          },
          "ele": {
            "type": "number",
            "minimum": -500,
            "maximum": 9000,
            "description": "Elevation in metres (optional)."
          },
          "time": {
            "type": "string",
            "maxLength": 40,
            "description": "ISO 8601 timestamp (optional)."
          }
        }
      },
      "description": "Alternative: ordered fixes."
    },
    "fences": {
      "type": "object",
      "description": "GeoJSON Feature or FeatureCollection of Polygon/MultiPolygon fences (max 500)."
    },
    "interpolate": {
      "type": "boolean",
      "default": true,
      "description": "Interpolate boundary crossings between fixes."
    },
    "min_dwell_s": {
      "type": "number",
      "minimum": 0,
      "maximum": 86400,
      "default": 0,
      "description": "Discard visits shorter than this (needs timestamps)."
    }
  }
}

Open original schema

Published input example

{
  "points": [
    {
      "lat": 52.005,
      "lon": 6.995,
      "time": "2026-10-01T10:00:00Z"
    },
    {
      "lat": 52.005,
      "lon": 7.005,
      "time": "2026-10-01T10:01:00Z"
    }
  ],
  "fences": {
    "type": "Feature",
    "id": "hof",
    "properties": {},
    "geometry": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            7,
            52
          ],
          [
            7.01,
            52
          ],
          [
            7.01,
            52.01
          ],
          [
            7,
            52.01
          ],
          [
            7,
            52
          ]
        ]
      ]
    }
  }
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’