{
  "slug": "csv-to-geojson",
  "name": "gizza-ai/csv-to-geojson",
  "version": "0.1.0",
  "title": "CSV to GeoJSON Converter — Lat/Lon Table to Points, Lines or Polygons — gizza.ai",
  "description": "Convert CSV, TSV, pipe, semicolon, or JSON coordinate tables into GeoJSON points, lines, or polygons with typing, bbox, and invalid-row controls.",
  "tags": [
    "csv to geojson",
    "geojson converter",
    "lat lon to geojson",
    "coordinates to geojson",
    "json to geojson",
    "tsv to geojson",
    "map data converter"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/csv-to-geojson/",
    "markdown": "https://gizza.ai/tools/csv-to-geojson/index.md",
    "descriptor": "https://gizza.ai/tools/csv-to-geojson/tool.json",
    "deep_link_example": "https://gizza.ai/tools/csv-to-geojson/?input=name%2Clat%2Clon%0ADenver%2C39.7392%2C-104.9903%0ABoulder%2C40.0150%2C-105.2705&lat=lat&lon=lon&elevation=elevation&delimiter=auto&shape=points&types=infer&precision=0&invalid=skip&bbox=true&pretty=true"
  },
  "cli": "gizza tool csv-to-geojson \"name,lat,lon\nDenver,39.7392,-104.9903\nBoulder,40.0150,-105.2705\"",
  "tool": {
    "description": "Convert a CSV/TSV/semicolon/pipe table or JSON array of objects with latitude and longitude columns into RFC 7946 GeoJSON. It auto-detects common lat/lon headers, preserves non-coordinate columns as properties, can infer property types, rounds coordinates, adds bbox, keeps invalid rows as null geometries, and can join rows into points, a LineString, or a Polygon.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "bbox": {
          "default": false,
          "description": "Add a GeoJSON bbox array spanning all valid coordinates. Default false.",
          "type": "boolean"
        },
        "delimiter": {
          "default": "auto",
          "description": "Input delimiter for text tables. 'auto' sniffs the header row; use comma, semicolon, tab, or pipe to force a delimiter. JSON input ignores this.",
          "enum": [
            "auto",
            "comma",
            "semicolon",
            "tab",
            "pipe"
          ],
          "type": "string"
        },
        "elevation": {
          "default": "",
          "description": "Optional elevation/altitude column name or 1-based index. Leave blank to auto-detect common altitude headers, or set '-' to keep elevation as a normal property instead of a third coordinate.",
          "type": "string"
        },
        "input": {
          "description": "CSV/TSV/pipe/semicolon table with a header row, or a JSON array of objects. The table must contain latitude and longitude columns (auto-detected from common names such as lat/lon, latitude/longitude, y/x) unless you set lat and lon explicitly.",
          "type": "string"
        },
        "invalid": {
          "default": "skip",
          "description": "How to handle rows with missing, non-numeric, or out-of-range coordinates. 'skip' omits them, 'error' stops with the first row error, and 'null' keeps a Feature with null geometry and the row properties.",
          "enum": [
            "skip",
            "error",
            "null"
          ],
          "type": "string"
        },
        "lat": {
          "default": "",
          "description": "Latitude column name or 1-based column index. Leave blank to auto-detect from common headers such as lat, latitude, y, northing, lat_dd.",
          "type": "string"
        },
        "lon": {
          "default": "",
          "description": "Longitude column name or 1-based column index. Leave blank to auto-detect from common headers such as lon, lng, longitude, x, easting, lon_dd.",
          "type": "string"
        },
        "precision": {
          "default": 0,
          "description": "Decimal places for coordinates and elevation. 0 keeps full parsed precision; 1-15 rounds coordinates after validation.",
          "maximum": 15,
          "minimum": 0,
          "type": "integer"
        },
        "pretty": {
          "default": true,
          "description": "Pretty-print GeoJSON with two-space indentation. Disable for compact one-line JSON.",
          "type": "boolean"
        },
        "shape": {
          "default": "points",
          "description": "GeoJSON shape to create. 'points' returns a FeatureCollection of Point features; 'line' joins rows in order into one LineString feature; 'polygon' joins rows into one closed Polygon ring.",
          "enum": [
            "points",
            "line",
            "polygon"
          ],
          "type": "string"
        },
        "types": {
          "default": "infer",
          "description": "How non-coordinate properties are typed. 'infer' converts plain numbers, booleans and blanks to JSON values while preserving identifiers like leading-zero ZIP codes; 'string' keeps CSV cells as strings.",
          "enum": [
            "infer",
            "string"
          ],
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}