Point | Geospatial Types | Teradata Package for Python - Point - 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

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