{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/geoapify/json-schema/geoapify-isoline-feature-collection-schema.json",
  "title": "IsolineFeatureCollection",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/geoapify-isoline-api-openapi.yml#/components/schemas/IsolineFeatureCollection",
  "type": "object",
  "required": [
    "type",
    "features",
    "properties"
  ],
  "properties": {
    "type": {
      "const": "FeatureCollection"
    },
    "features": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IsolineFeature"
      }
    },
    "bbox": {
      "type": "array",
      "minItems": 4,
      "maxItems": 6,
      "items": {
        "type": "number"
      }
    },
    "properties": {
      "$ref": "#/$defs/IsolineCollectionProperties"
    }
  },
  "$defs": {
    "Avoid": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "tolls",
            "ferries",
            "highways",
            "locations",
            "polygons",
            "green_zones",
            "country_codes",
            "transfers"
          ]
        },
        "importance": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "values": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/LocationData"
              }
            },
            {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/LocationData"
                }
              }
            }
          ]
        }
      }
    },
    "IsolineCollectionProperties": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string"
        }
      }
    },
    "IsolineDetails": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      },
      "properties": {
        "population": {
          "type": "object",
          "required": [],
          "properties": {
            "attribution": {
              "type": "string"
            },
            "value": {
              "type": "number"
            }
          }
        }
      }
    },
    "IsolineFeature": {
      "type": "object",
      "required": [
        "type",
        "geometry",
        "properties"
      ],
      "properties": {
        "type": {
          "const": "Feature"
        },
        "geometry": {
          "$ref": "#/$defs/IsolineGeometry"
        },
        "properties": {
          "$ref": "#/$defs/IsolineFeatureProperties"
        },
        "id": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            }
          ]
        },
        "bbox": {
          "type": "array",
          "minItems": 4,
          "maxItems": 6,
          "items": {
            "type": "number"
          }
        }
      }
    },
    "IsolineFeatureProperties": {
      "type": "object",
      "required": [
        "id",
        "lat",
        "lon",
        "mode",
        "type",
        "range"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "lat": {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        "mode": {
          "type": "string",
          "enum": [
            "walk",
            "hike",
            "scooter",
            "motorcycle",
            "drive",
            "light_truck",
            "bicycle",
            "mountain_bike",
            "road_bike",
            "bus",
            "medium_truck",
            "truck",
            "truck_dangerous_goods",
            "heavy_truck",
            "long_truck",
            "transit",
            "approximated_transit"
          ]
        },
        "type": {
          "type": "string",
          "enum": [
            "time",
            "distance"
          ]
        },
        "range": {
          "type": "number"
        },
        "details": {
          "$ref": "#/$defs/IsolineDetails"
        },
        "route_type": {
          "type": "string",
          "enum": [
            "balanced",
            "short",
            "less_maneuvers"
          ]
        },
        "max_speed": {
          "type": "number"
        },
        "units": {
          "type": "string",
          "enum": [
            "metric",
            "imperial"
          ]
        },
        "traffic": {
          "type": "string",
          "enum": [
            "free_flow",
            "approximated"
          ]
        },
        "avoid": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Avoid"
          }
        }
      }
    },
    "IsolineGeometry": {
      "oneOf": [
        {
          "$ref": "#/$defs/PolygonGeometry"
        },
        {
          "$ref": "#/$defs/MultiPolygonGeometry"
        }
      ]
    },
    "JsonObject": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      }
    },
    "JsonValue": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/JsonValue"
          }
        },
        {
          "$ref": "#/$defs/JsonObject"
        }
      ]
    },
    "LocationData": {
      "type": "object",
      "required": [
        "lat",
        "lon"
      ],
      "properties": {
        "lat": {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        "address": {
          "type": "string"
        }
      }
    },
    "LongitudeLatitude": {
      "type": "array",
      "minItems": 2,
      "maxItems": 2,
      "prefixItems": [
        {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        }
      ],
      "items": false
    },
    "MultiPolygonGeometry": {
      "type": "object",
      "required": [
        "type",
        "coordinates"
      ],
      "properties": {
        "type": {
          "const": "MultiPolygon"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "array",
              "minItems": 4,
              "items": {
                "$ref": "#/$defs/LongitudeLatitude"
              }
            }
          }
        }
      }
    },
    "PolygonGeometry": {
      "type": "object",
      "required": [
        "type",
        "coordinates"
      ],
      "properties": {
        "type": {
          "const": "Polygon"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "type": "array",
            "minItems": 4,
            "items": {
              "$ref": "#/$defs/LongitudeLatitude"
            }
          }
        }
      }
    }
  }
}