MultiLineString | Geospatial Types | Teradata Package for Python - MultiLineString - 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
March 2024
Language
English (United States)
Last Update
2024-10-10
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
lifecycle
latest
Product Category
Teradata Vantage

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