Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions docs/reference/sql/st_geomcollfromtext.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

title: ST_GeomCollFromText
description: Constructs a GeometryCollection from Well-Known Text (WKT), erroring if the input is not a GeometryCollection.
kernels:
- returns: geometry
args:
- name: wkt
type: string
- returns: geometry
args:
- name: wkt
type: string
- name: srid
type: crs
---

## Description

Parses a WKT string and returns a geometry. Raises an error if the WKT does not represent a GeometryCollection.

## Examples

```sql
SELECT ST_GeomCollFromText('GEOMETRYCOLLECTION (POINT (0 0), LINESTRING (0 0, 1 1))');
```

With an SRID:

```sql
SELECT ST_GeomCollFromText('GEOMETRYCOLLECTION (POINT (0 0), LINESTRING (0 0, 1 1))', 4326);
```
50 changes: 50 additions & 0 deletions docs/reference/sql/st_linefromtext.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

title: ST_LineFromText
description: Constructs a LineString from Well-Known Text (WKT), erroring if the input is not a LineString.
kernels:
- returns: geometry
args:
- name: wkt
type: string
- returns: geometry
args:
- name: wkt
type: string
- name: srid
type: crs
---

## Description

Parses a WKT string and returns a geometry. Raises an error if the WKT does not represent a LineString.

This function also has the alias `ST_LineStringFromText`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This function also has the alias `ST_LineStringFromText`.
Aliases: `ST_LineStringFromText`.


## Examples

```sql
SELECT ST_LineFromText('LINESTRING (0 0, 1 1, 2 2)');
```

With an SRID:

```sql
SELECT ST_LineFromText('LINESTRING (0 0, 1 1, 2 2)', 4326);
```
48 changes: 48 additions & 0 deletions docs/reference/sql/st_mlinefromtext.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

title: ST_MLineFromText
description: Constructs a MultiLineString from Well-Known Text (WKT), erroring if the input is not a MultiLineString.
kernels:
- returns: geometry
args:
- name: wkt
type: string
- returns: geometry
args:
- name: wkt
type: string
- name: srid
type: crs
---

## Description

Parses a WKT string and returns a geometry. Raises an error if the WKT does not represent a MultiLineString.

## Examples

```sql
SELECT ST_MLineFromText('MULTILINESTRING ((0 0, 1 1), (2 2, 3 3))');
```

With an SRID:

```sql
SELECT ST_MLineFromText('MULTILINESTRING ((0 0, 1 1), (2 2, 3 3))', 4326);
```
48 changes: 48 additions & 0 deletions docs/reference/sql/st_mpointfromtext.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

title: ST_MPointFromText
description: Constructs a MultiPoint from Well-Known Text (WKT), erroring if the input is not a MultiPoint.
kernels:
- returns: geometry
args:
- name: wkt
type: string
- returns: geometry
args:
- name: wkt
type: string
- name: srid
type: crs
---

## Description

Parses a WKT string and returns a geometry. Raises an error if the WKT does not represent a MultiPoint.

## Examples

```sql
SELECT ST_MPointFromText('MULTIPOINT ((0 0), (1 1), (2 2))');
```

With an SRID:

```sql
SELECT ST_MPointFromText('MULTIPOINT ((0 0), (1 1), (2 2))', 4326);
```
48 changes: 48 additions & 0 deletions docs/reference/sql/st_mpolyfromtext.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

title: ST_MPolyFromText
description: Constructs a MultiPolygon from Well-Known Text (WKT), erroring if the input is not a MultiPolygon.
kernels:
- returns: geometry
args:
- name: wkt
type: string
- returns: geometry
args:
- name: wkt
type: string
- name: srid
type: crs
---

## Description

Parses a WKT string and returns a geometry. Raises an error if the WKT does not represent a MultiPolygon.

## Examples

```sql
SELECT ST_MPolyFromText('MULTIPOLYGON (((0 0, 1 0, 1 1, 0 0)), ((2 2, 3 2, 3 3, 2 2)))');
```

With an SRID:

```sql
SELECT ST_MPolyFromText('MULTIPOLYGON (((0 0, 1 0, 1 1, 0 0)), ((2 2, 3 2, 3 3, 2 2)))', 4326);
```
48 changes: 48 additions & 0 deletions docs/reference/sql/st_pointfromtext.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

title: ST_PointFromText
description: Constructs a Point from Well-Known Text (WKT), erroring if the input is not a Point.
kernels:
- returns: geometry
args:
- name: wkt
type: string
- returns: geometry
args:
- name: wkt
type: string
- name: srid
type: crs
---

## Description

Parses a WKT string and returns a geometry. Raises an error if the WKT does not represent a Point.

## Examples

```sql
SELECT ST_PointFromText('POINT (30 10)');
```

With an SRID:

```sql
SELECT ST_PointFromText('POINT (30 10)', 4326);
```
48 changes: 48 additions & 0 deletions docs/reference/sql/st_polygonfromtext.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

title: ST_PolygonFromText
description: Constructs a Polygon from Well-Known Text (WKT), erroring if the input is not a Polygon.
kernels:
- returns: geometry
args:
- name: wkt
type: string
- returns: geometry
args:
- name: wkt
type: string
- name: srid
type: crs
---

## Description

Parses a WKT string and returns a geometry. Raises an error if the WKT does not represent a Polygon.

## Examples

```sql
SELECT ST_PolygonFromText('POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0))');
```

With an SRID:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
With an SRID:
With an SRID or CRS:

(For the others as well)


```sql
SELECT ST_PolygonFromText('POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0))', 4326);
```
7 changes: 7 additions & 0 deletions rust/sedona-functions/src/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,15 @@ pub fn default_function_set() -> FunctionSet {
crate::st_geomfromwkb::st_geomfromwkb_udf,
crate::st_geomfromwkb::st_geomfromwkbunchecked_udf,
crate::st_geomfromwkt::st_geogfromwkt_udf,
crate::st_geomfromwkt::st_geomcollfromtext_udf,
crate::st_geomfromwkt::st_geomfromewkt_udf,
crate::st_geomfromwkt::st_geomfromwkt_udf,
crate::st_geomfromwkt::st_linefromtext_udf,
crate::st_geomfromwkt::st_mlinefromtext_udf,
crate::st_geomfromwkt::st_mpointfromtext_udf,
crate::st_geomfromwkt::st_mpolyfromtext_udf,
crate::st_geomfromwkt::st_pointfromtext_udf,
crate::st_geomfromwkt::st_polygonfromtext_udf,
crate::st_haszm::st_hasm_udf,
crate::st_haszm::st_hasz_udf,
crate::st_interiorringn::st_interiorringn_udf,
Expand Down
Loading
Loading