Skip to content

Commit

Permalink
fix: add geometry extension type
Browse files Browse the repository at this point in the history
  • Loading branch information
richtia committed Sep 6, 2023
1 parent 8417df0 commit ac6f82a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 32 deletions.
15 changes: 2 additions & 13 deletions extensions/extension_types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,10 @@ types:
structure:
latitude: i32
longitude: i32
- name: multipoint
structure:
x: point
y: point
- name: line
structure:
start: point
end: point
- name: linestring
structure:
coordinate: point
variadic:
min: 2
- name: polygon
- name: geometry
structure:
coordinates: linestring
variadic:
min: 1
coordinates: List<point>
25 changes: 6 additions & 19 deletions extensions/functions_geometry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,15 @@ scalar_functions:
-
name: "st_makeline"
description: >
Return a linestring containing the points of point, multipoint, or linestring geometries.
Repeated points at the beginning of input linestring are collapsed to a single point.
Repeated points in point and multipoint inputs are not collapsed.
Return a linestring containing the points of the two input geometries.
Repeated points at the beginning of input geometries are collapsed to a single point.
A linestring can be closed or simple. A closed linestring starts and ends on the same
point. A simple linestring does not cross or touch itself.
point. A simple linestring does not cross or touch itself.
impls:
- args:
- name: x
value: point
value: geometry
- name: y
value: point
return: linestring
- args:
- name: x
value: multipoint
- name: y
value: multipoint
return: linestring
- args:
- name: x
value: linestring
- name: y
value: linestring
return: linestring
value: geometry
return: geometry

0 comments on commit ac6f82a

Please sign in to comment.