| ST_AsText(ST_Envelope(ST_GeomFromText(’LineString(1 1,2 2)’))) | +----------------------------------------------------------------+ | POLYGON((1 1,2 1,2 2,1 2,1 1)) | +----------------------------------------------------------------+ 

If the argument is a point or a vertical or horizontal line segment, ST_Envelope()  returns the point or the line segment as its MBR rather than returning an invalid polygon: 

mysql> SELECT ST_AsText(ST_Envelope(ST_GeomFromText(’LineString(1 1,1 2)’))); +----------------------------------------------------------------+ | ST_AsText(ST_Envelope(ST_GeomFromText(’LineString(1 1,1 2)’))) | +----------------------------------------------------------------+ | LINESTRING(1 1,1 2) | +----------------------------------------------------------------+ 

ST_Envelope()  handles its arguments as described in the introduction to this section, with this exception: 

•If the geometry has an SRID value for a geographic spatial reference system (SRS), an ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS  error occurs. 

• ST_GeometryType( g ) 

Returns a binary string indicating the name of the geometry type of which the geometry instance g  is a member. The name corresponds to one of the instantiable Geometry  subclasses. 

ST_GeometryType()  handles its arguments as described in the introduction to this section. 

mysql> SELECT ST_GeometryType(ST_GeomFromText(’POINT(1 1)’)); +------------------------------------------------+ | ST_GeometryType(ST_GeomFromText(’POINT(1 1)’)) | +------------------------------------------------+ | POINT | +------------------------------------------------+ 

• ST_IsEmpty( g ) 

This function is a placeholder that returns 1 for an empty geometry collection value or 0 otherwise. 

The only valid empty geometry is represented in the form of an empty geometry collection value. MySQL does not support GIS EMPTY  values such as POINT EMPTY . 

ST_IsEmpty()  handles its arguments as described in the introduction to this section. 

