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

Teradata® Package for Python User Guide

Product
Teradata Package for Python
Release Number
17.10
Published
May 2022
Language
English (United States)
Last Update
2022-08-18
dita:mapPath
rsu1641592952675.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
B700-4006
lifecycle
previous
Product Category
Teradata Vantage

This function enables end user to create an object holding the multiple Point geometry objects. It allows user to use the same in GeoDataFrame manipulation and processing using any Geospatial function.

Optional argument:

points: Specifies the list of Point objects. If no points are passed, an object for empty MultiPoint is created.

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

>>> from teradataml import Point, MultiPoint
>>> p1 = Point(0, 0)
>>> p2 = Point(0, 20)
>>> p3 = Point(20, 20)
>>> p4 = Point(20, 0)
>>> go1 = MultiPoint([p1, p2, p3, p4, p1])
>>> # Print the coordinates.
>>> print(go1.coords)
[(0, 0), (0, 20), (20, 20), (20, 0), (0, 0)]
>>> # Print the geometry type.
>>> print(go1.geom_type)
MultiPoint

Example 2: Create an empty MultiPoint

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