ST_Latitude()

TL;DR

Use ST_Latitude() to obtain the second coordinate of a point.

Returns a point’s latitude coordinate.

Syntax

ST_Latitude(point)

Arguments

Argument

Description

point

A POINT GEOMETRY or GEOMETRY32 value.

Return Value

Returns FLOAT64 for GEOMETRY and FLOAT32 for GEOMETRY32.

Usage Notes

  • The tested point input is POINT(3 4), for which latitude is the second coordinate.

Examples

DROP DATABASE IF EXISTS geo_latitude_demo;
CREATE DATABASE geo_latitude_demo;
USE geo_latitude_demo;

SELECT ST_Latitude(ST_GeomFromText('POINT(3 4)')) AS latitude;

DROP DATABASE geo_latitude_demo;

See Also