Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198.
Existing Python UDFs will continue to function until June 30, 2026. For more information, see the
blog post
ST_StartPoint
ST_StartPoint returns the first point of an input linestring. The spatial reference system identifier (SRID) value of the result is the same as that of the input geometry. The dimension of the returned geometry is the same as that of the input geometry.
Syntax
ST_StartPoint(geom)
Arguments
- geom
-
A value of data type
GEOMETRYor an expression that evaluates to aGEOMETRYtype. The subtype must beLINESTRING.
Return type
GEOMETRY
If geom is null, then null is returned.
If geom is empty, then null is returned.
If geom isn't a LINESTRING, then null is returned.
Examples
The following SQL returns an extended well-known text (EWKT) representation of a four-point
LINESTRING to a GEOMETRY object and returns the start point of the linestring.
SELECT ST_AsEWKT(ST_StartPoint(ST_GeomFromText('LINESTRING(0 0,10 0,10 10,5 5,0 5)',4326)));
st_asewkt
-------------
SRID=4326;POINT(0 0)