POINT_IN_POLYGON (Lakehouse v1)
Calculates whether a given point falls within the polygon formed by joining multiple points. A polygon is a closed shape connected by coordinate pairs in the order they appear. Changing the order of coordinate pairs can result in a different shape.
Analyze Syntax
Section titled “Analyze Syntax”func.point_in_polygon((x,y), [(a,b), (c,d), (e,f) ... ])Analyze Examples
Section titled “Analyze Examples”func.point_in_polygon((3., 3.), [(6, 0), (8, 4), (5, 8), (0, 2)])
┌─────────────────────────────────────────────────────────────────┐│ func.point_in_polygon((3, 3), [(6, 0), (8, 4), (5, 8), (0, 2)]) │├─────────────────────────────────────────────────────────────────┤│ 1 │└─────────────────────────────────────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”POINT_IN_POLYGON((x,y), [(a,b), (c,d), (e,f) ... ])SQL Examples
Section titled “SQL Examples”SELECT POINT_IN_POLYGON((3., 3.), [(6, 0), (8, 4), (5, 8), (0, 2)]);
┌────────────────────────────────────────────────────────────┐│ point_in_polygon((3, 3), [(6, 0), (8, 4), (5, 8), (0, 2)]) │├────────────────────────────────────────────────────────────┤│ 1 │└────────────────────────────────────────────────────────────┘