Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - MultiLineString - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
17.20
Publication Date
November 2022
Content Type
Programming Reference
Publication ID
B700-4500-112K
ft:locale
en-US
ft:lastEdition
2024-02-21
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_1720
Product Category
Teradata Vantage

 
teradataml.geospatial.geometry_types.MultiLineString = class MultiLineString(GeometryType)
    teradataml.geospatial.geometry_types.MultiLineString(lines=None)
 
Class MultiLineString enables end user to create an object holding multiple
LineString geometry objects. Allows user to use the same in GeoDataFrame
manipulation and processing.
 
 
Method resolution order:
MultiLineString
GeometryType
builtins.object

Methods defined here:
__init__(self, lines=None)
DESCRIPTION:
    Enables end user to create an object holding the multiple LineString
    geometry objects. Allows user to use the same in GeoDataFrame
    manipulation and processing using any Geospatial function.
 
PARAMETERS:
    lines:
        Optional Argument.
        Specifies the list of lines. If no lines are passed, an object
        for empty MultiLineString is created.
        Types: List of LineString objects
 
RETURNS:
    MultiLineString
 
RAISES:
    TeradataMlException, TypeError, ValueError
 
EXAMPLES:
    >>> from teradataml import LineString, MultiLineString
 
    # Example 1: Create a MultiPoint in 2D, using x and y coordinates.
    >>> 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.
    >>> mls = MultiLineString()
    >>> # Print the coordinates.
    >>> print(mls.coords)
    EMPTY
    >>>

Methods inherited from GeometryType:
__getattr__(self, item)
__str__(self)
Return String Representation for a Geometry object.

Readonly properties inherited from GeometryType:
coords
Returns the coordinates of the Geometry object.
geom_type
Returns the type of a Geometry.