teradataml Geometry Types - teradataml Geometry Types - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
teradataml provides support to create the following geometry objects:

This allows user to create a geometry object of any type, that can be used for processing teradataml GeoDataFrame and teradataml GeoDataFrameColumn. These objects can be passed as argument values or can be used in slice filtering with Geospatial specific methods and properties of teradataml GeoDataFrame and teradataml GeoDataFrameColumn.

See Teradata Package for Python Function Reference on VantageCloud Lake for detailed information and examples for geometry objects.

Example: Geometry type generic usage

from teradataml import GeoDataFrame, LineString
# Create a GeoDataFrame on table "sample_streets"
geoDF = GeoDataFrame("sample_streets")
# Create a LineString object.
l1 = LineString([(0, 0), (0, 20), (20, 20)])
# Case 1: Using Geometry type object as argument value for the Geospatial specific functions.
geoDF[geoDF.streetShape.crosses(l1) < 1E0].select("streetName") 
# Case 2: Using Geometry type object in slice filtering.
geoDF[geoDF.streetShape == l1]