ST_Is3D

ST_Is3D takes a geometry column and returns a boolean column. The function returns True if the geometry is three-dimensional; otherwise, it returns False. The geometry is considered three-dimensional if it has x,y,z coordinates.

FunctionSyntax
Pythonis_3d(geometry)
SQLST_Is3D(geometry)
Scalais3D(geometry)

For more details, go to the GeoAnalytics Engine API reference for is_3d.

This function implements the OpenGIS Simple Features Implementation Specification for SQL 1.2.1

Examples

PythonPythonSQLScala
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
from geoanalytics.sql import functions as ST, Point

data = [
    (Point(10,12,4), ),
    (Point(10,12), )
]

df = spark.createDataFrame(data, ["point"])

df.select(ST.is_3d("point").alias("is_3d")).show()
Result
Use dark colors for code blocksCopy
1
2
3
4
5
6
+-----+
|is_3d|
+-----+
| true|
|false|
+-----+

Version table

ReleaseNotes

1.0.0

Python and SQL functions introduced

1.5.0

Scala function introduced

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.