Point | Geospatial Types | Teradata Package for Python - Point - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
December 2024
Language
English (United States)
Last Update
2024-12-18
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

This function enables end user to create an object for the single Point using the coordinates. It allows user to use the same in GeoDataFrame manipulation and processing using any Geospatial function.

Optional argument:

coordinates: Specifies the coordinates of a point. Coordinates must be specified in positional fashion.
  • If coordinates are not passed, an object for empty point is created.
  • When coordinates are passed, you must pass one of the following:
    • Two values to define a point in 2-dimensions;
    • Three values to define a point in 3-dimensions.

Example 1: Create a Point in 2D, using x and y coordinates

>>> from teradataml import Point
>>> p1 = Point(0, 20)
>>> # Print the coordinates.
>>> print(p1.coords)
(0, 20)
>>> # Print the geometry type.
>>> p1.geom_type
'Point'

Example 2: Create a Point in 3D, using x, y and z coordinates

>>> from teradataml import Point
>>> p2 = Point(0, 20, 30)
>>> # Print the coordinates.
>>> print(p2.coords)
(0, 20, 30)

Example 3: Create an empty Point

>>> from teradataml import Point
>>> pe = Point()
>>> # Print the coordinates.
>>> print(pe.coords)
EMPTY