MultiLineString | Geospatial Types | Teradata Package for Python - MultiLineString - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

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

Optional argument:

lines: Specifies the list of LineString objects. If no lines are passed, an object for empty MultiLineString is created.

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

>>> from teradataml import LineString, MultiLineString
>>> l1 = LineString([(1, 3), (3, 0), (0, 1)])
>>> l2 = LineString([(1.35, 3.6456), (3.6756, 0.23), (0.345, 1.756)])
>>> go1 = MultiLineString([l1, l2])
>>> # Print the coordinates.
>>> print(go1.coords)
[[(1, 3), (3, 0), (0, 1)], [(1.35, 3.6456), (3.6756, 0.23), (0.345, 1.756)]]
>>> # Print the geometry type.
>>> print(go1.geom_type)
MultiLineString

Example 2: Create an empty MultiLineString

>>> from teradataml import LineString, MultiLineString
>>> mls = MultiLineString()
>>> # Print the coordinates.
>>> print(mls.coords)
EMPTY