Teradata Package for Python Function Reference | 17.10 - start_point - 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

Product
Teradata Package for Python
Release Number
17.10
Published
April 2022
Language
English (United States)
Last Update
2022-08-19
lifecycle
previous
Product Category
Teradata Vantage
teradataml.geospatial.geodataframe.GeoDataFrame.start_point = start_point(self)
DESCRIPTION:
    Returns the start point of an ST_LineString or GeoSequence value.
    Note:
        *  This method returns a point having a Z coordinate if the input
          geometry is three-dimensional.
 
PARAMETERS:
    None
 
SUPPORTED GEOMETRY TYPES:
    ST_LineString and GeoSequence
 
RAISES:
    TypeError, ValueError, TeradataMlException
 
RETURNS:
    GeoDataFrame
    Resultant column contains a NULL, if the Geometry is an empty set.
 
EXAMPLES:
    from teradataml import GeoDataFrame, load_example_data
    from teradataml import Point, LineString, Polygon
    # Load example data.
    load_example_data("geodataframe", "sample_shapes")
    # Create a GeoDataFrame.
    geodf = GeoDataFrame("sample_shapes")
    print(geodf)
    
    # Example 1: Get the start points of (ST_Linestring) geometries in column
    #            'linestrings'.
    # Process the GeoDataFrame to select only two columns, skey and linestrings and filter the
    # rows where geometry type is ST_Linestring.
    lines = geodf.select(["skey", "linestrings"])[geodf.linestrings.geom_type == "ST_Linestring"]
    lines.start_point()