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 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]