{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "st_simplify",
  "description" : "Simplifies the input geometry by applying the Douglas-Peucker algorithm with a specified tolerance. Vertices that fall within the tolerance distance from the simplified shape are removed. Note that the resulting geometry may be invalid, even if the original input was valid.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "geometry",
          "type" : "cartesian_point",
          "optional" : false,
          "description" : "Expression of type `geo_point`, `geo_shape`, `cartesian_point` or `cartesian_shape`. If `null`, the function returns `null`."
        },
        {
          "name" : "tolerance",
          "type" : "double",
          "optional" : false,
          "description" : "Tolerance for the geometry simplification, in the units of the input SRS"
        }
      ],
      "variadic" : false,
      "returnType" : "cartesian_point"
    },
    {
      "params" : [
        {
          "name" : "geometry",
          "type" : "cartesian_shape",
          "optional" : false,
          "description" : "Expression of type `geo_point`, `geo_shape`, `cartesian_point` or `cartesian_shape`. If `null`, the function returns `null`."
        },
        {
          "name" : "tolerance",
          "type" : "double",
          "optional" : false,
          "description" : "Tolerance for the geometry simplification, in the units of the input SRS"
        }
      ],
      "variadic" : false,
      "returnType" : "cartesian_shape"
    },
    {
      "params" : [
        {
          "name" : "geometry",
          "type" : "geo_point",
          "optional" : false,
          "description" : "Expression of type `geo_point`, `geo_shape`, `cartesian_point` or `cartesian_shape`. If `null`, the function returns `null`."
        },
        {
          "name" : "tolerance",
          "type" : "double",
          "optional" : false,
          "description" : "Tolerance for the geometry simplification, in the units of the input SRS"
        }
      ],
      "variadic" : false,
      "returnType" : "geo_point"
    },
    {
      "params" : [
        {
          "name" : "geometry",
          "type" : "geo_shape",
          "optional" : false,
          "description" : "Expression of type `geo_point`, `geo_shape`, `cartesian_point` or `cartesian_shape`. If `null`, the function returns `null`."
        },
        {
          "name" : "tolerance",
          "type" : "double",
          "optional" : false,
          "description" : "Tolerance for the geometry simplification, in the units of the input SRS"
        }
      ],
      "variadic" : false,
      "returnType" : "geo_shape"
    }
  ],
  "examples" : [
    "ROW wkt = \"POLYGON ((7.998 53.827, 9.470 53.068, 15.754 53.801, 16.523 57.160, 11.162 57.868, 8.064 57.445, 6.219 55.317, 7.998 53.827))\"\n| EVAL simplified = ST_SIMPLIFY(TO_GEOSHAPE(wkt), 0.7)"
  ],
  "preview" : true,
  "snapshot_only" : false
}
