{
  "slug": "geojson-format",
  "name": "gizza-ai/geojson-format",
  "version": "0.1.0",
  "title": "GeoJSON Formatter — Pretty Print, Minify, Round Coordinates & Re-key — gizza.ai",
  "description": "Format GeoJSON locally: pretty-print, minify, round coordinates, reorder keys, add bbox, fix winding, and prune properties.",
  "tags": [
    "geojson formatter",
    "geojson minifier",
    "geojson validator",
    "geojson bbox",
    "coordinate precision",
    "rfc 7946",
    "geojson pretty print",
    "geojson canonicalize"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/geojson-format/",
    "markdown": "https://gizza.ai/tools/geojson-format/index.md",
    "descriptor": "https://gizza.ai/tools/geojson-format/tool.json",
    "deep_link_example": "https://gizza.ai/tools/geojson-format/?input=%7B%22type%22%3A%22Feature%22%2C%22properties%22%3A%7B%22name%22%3A%22Park%22%2C%22note%22%3A%22%22%7D%2C%22geometry%22%3A%7B%22type%22%3A%22Point%22%2C%22coordinates%22%3A%5B12.3456789%2C-9.8765432%5D%7D%7D&indent=2&indent_char=space&precision=-1&key_order=keep&bbox=keep&winding=keep&keep_properties=name%2Cid&drop_properties=debug%2Ctemp%2Csource&drop_empty_properties=true&validate=true"
  },
  "cli": "gizza tool geojson-format '{\"type\":\"Feature\",\"properties\":{\"name\":\"Park\",\"note\":\"\"},\"geometry\":{\"type\":\"Point\",\"coordinates\":[12.3456789,-9.8765432]}}'",
  "tool": {
    "description": "Pretty-print or minify one GeoJSON document while preserving its shape (FeatureCollection, Feature, or bare geometry). Optionally round coordinate precision, reorder keys (keep, canonical GeoJSON order, or alphabetical), recompute or strip bbox members, rewind polygon rings to the RFC 7946 right-hand rule, prune feature properties, drop empty property values, and validate RFC 7946 geometry structure before output. Use indent=0 for minified output, precision=-1 to keep coordinates unchanged, bbox='features' to add per-feature and top-level boxes, and validate=false only for known-nonconforming data you still need to clean up. Runs locally and returns GeoJSON text.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "bbox": {
          "default": "keep",
          "description": "Bounding-box handling: keep existing bbox members, add/recompute the top-level bbox, add feature bboxes plus the top-level bbox, or strip every bbox member.",
          "enum": [
            "keep",
            "add",
            "features",
            "strip"
          ],
          "type": "string"
        },
        "drop_empty_properties": {
          "default": false,
          "description": "Remove feature properties whose value is null, an empty string, an empty array, or an empty object.",
          "type": "boolean"
        },
        "drop_properties": {
          "description": "Optional comma- or newline-separated feature property names to remove. Applied after keep_properties.",
          "type": "string"
        },
        "indent": {
          "default": 2,
          "description": "Indent units per nesting level. 2 pretty-prints with two spaces (default); 0 minifies to one line. Values above 8 are rejected.",
          "maximum": 8,
          "minimum": 0,
          "type": "integer"
        },
        "indent_char": {
          "default": "space",
          "description": "Indentation character for pretty output: spaces (default) or tabs. Ignored when indent=0.",
          "enum": [
            "space",
            "tab"
          ],
          "type": "string"
        },
        "input": {
          "description": "A single GeoJSON document to format: a FeatureCollection, Feature, or bare geometry object. Paste valid JSON with a GeoJSON type member. The document shape is preserved; use geojson-merge for multiple or line-delimited inputs.",
          "type": "string"
        },
        "keep_properties": {
          "description": "Optional comma- or newline-separated feature property names to keep. When set, all other properties are removed from Feature objects.",
          "type": "string"
        },
        "key_order": {
          "default": "keep",
          "description": "Object member ordering. keep preserves the input order; canonical writes GeoJSON members in RFC-style order while preserving properties order; alpha sorts every object key alphabetically, including properties.",
          "enum": [
            "keep",
            "canonical",
            "alpha"
          ],
          "type": "string"
        },
        "precision": {
          "default": -1,
          "description": "Decimal places to round coordinates to. -1 keeps full precision (default); 0 rounds to whole degrees; 5 is roughly metre-level at the equator. Rounding is lossy.",
          "maximum": 15,
          "minimum": -1,
          "type": "integer"
        },
        "validate": {
          "default": true,
          "description": "Validate the input as RFC 7946 GeoJSON before formatting (default true): geometry types, coordinate ranges, required Feature members, and polygon ring closure. Turn off only to clean up known-nonconforming data.",
          "type": "boolean"
        },
        "winding": {
          "default": "keep",
          "description": "Polygon ring orientation. keep leaves rings untouched; rfc7946 rewinds exterior rings counterclockwise and holes clockwise (right-hand rule).",
          "enum": [
            "keep",
            "rfc7946"
          ],
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}