{
  "slug": "geofence-check",
  "name": "gizza-ai/geofence-check",
  "version": "0.1.0",
  "title": "Point in Polygon Checker (Geofence Test) — gizza.ai",
  "description": "Test latitude/longitude points against a polygon geofence. Paste GeoJSON or lat,lon lines, choose boundary handling, and export text, CSV, or JSON.",
  "tags": [
    "point in polygon",
    "geofence",
    "point in polygon checker",
    "geojson",
    "latitude longitude",
    "inside polygon",
    "ray casting",
    "gis"
  ],
  "category": "utilities",
  "urls": {
    "page": "https://gizza.ai/tools/geofence-check/",
    "markdown": "https://gizza.ai/tools/geofence-check/index.md",
    "descriptor": "https://gizza.ai/tools/geofence-check/tool.json",
    "deep_link_example": "https://gizza.ai/tools/geofence-check/?polygon=0%2C0%0A0%2C10%0A10%2C10%0A10%2C0%20%20%20%28or%20GeoJSON%3A%20%7B%22type%22%3A%22Polygon%22%2C%22coordinates%22%3A%5B%5B%5B0%2C0%5D%2C%5B10%2C0%5D%2C%5B10%2C10%5D%2C%5B0%2C10%5D%2C%5B0%2C0%5D%5D%5D%7D%29&points=40.0%2C-105.0%2CDepot%0A41.25%2C-106.5%2CWarehouse&coord_order=lat_lon&boundary=inside&output=text"
  },
  "cli": "gizza tool geofence-check '0,0\n0,10\n10,10\n10,0   (or GeoJSON: {\"type\":\"Polygon\",\"coordinates\":[[[0,0],[10,0],[10,10],[0,10],[0,0]]]})' 'points=40.0,-105.0,Depot\n41.25,-106.5,Warehouse'",
  "tool": {
    "description": "Test whether latitude/longitude points fall inside a polygon (point-in-polygon / geofence). Pass `polygon` as GeoJSON (Polygon or MultiPolygon with holes, or a Feature/FeatureCollection wrapping them; coordinates are [longitude, latitude]) or a simple ring as `lat,lon` lines / a JSON array of [lat,lon] pairs. Pass `points` as CSV `lat,lon` lines (an optional third field is a label), a JSON array of [lat,lon] pairs or {lat,lon,label} objects, or GeoJSON Point/MultiPoint features. `coord_order` ('lat_lon' default / 'lon_lat') applies to the non-GeoJSON forms; GeoJSON is always [lon, lat]. `boundary` chooses how on-edge points are classified: 'inside' (default), 'outside', or 'boundary' (its own status). `output` is 'text' (default), 'csv', or 'json'. Uses even-odd ray casting; holes and multipolygons are honored. Coordinates are decimal degrees (lat -90..90, lon -180..180). Runs locally on the device.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "boundary": {
          "default": "inside",
          "description": "How a point that lies exactly on an edge or vertex is classified: 'inside' (default) counts it as inside, 'outside' counts it as outside, 'boundary' reports it with its own 'boundary' status.",
          "enum": [
            "inside",
            "outside",
            "boundary"
          ],
          "type": "string"
        },
        "coord_order": {
          "default": "lat_lon",
          "description": "Coordinate order for the non-GeoJSON forms (CSV lines and JSON pairs): 'lat_lon' (default, e.g. `51.5,-0.12`) or 'lon_lat'. GeoJSON always uses [longitude, latitude] per RFC 7946 and ignores this.",
          "enum": [
            "lat_lon",
            "lon_lat"
          ],
          "type": "string"
        },
        "output": {
          "default": "text",
          "description": "Output format: 'text' (default) a summary line plus one line per point; 'csv' a table with columns point, latitude, longitude[, label], status; 'json' an object with a summary and a points array.",
          "enum": [
            "text",
            "csv",
            "json"
          ],
          "type": "string"
        },
        "points": {
          "description": "The points to test, one or many. Accepts CSV lines `lat,lon` (an optional third field is a label), a JSON array of [lat,lon] pairs or {lat,lon,label} objects, or GeoJSON Point/MultiPoint/Feature/FeatureCollection ([longitude, latitude]). CSV and JSON-pair coordinate order follows coord_order; GeoJSON is always [lon, lat]. Blank lines and lines starting with # are ignored; a non-numeric first line is treated as a header.",
          "type": "string"
        },
        "polygon": {
          "description": "The boundary polygon. Accepts GeoJSON — a Polygon or MultiPolygon (interior rings act as holes), or a Feature/FeatureCollection/GeometryCollection wrapping them (all polygons are unioned) — where coordinates are [longitude, latitude]. Or a simple ring as `lat,lon` lines (one vertex per line) or a JSON array of [lat,lon] pairs; the ring is auto-closed and its coordinate order follows coord_order. Needs at least 3 vertices.",
          "type": "string"
        }
      },
      "required": [
        "polygon",
        "points"
      ],
      "type": "object"
    }
  }
}