| MULTIPOINT((1 1),(2 2)) | +---------------------------------------+ 

## • ST_Transform( g , target_srid ) 

Transforms a geometry from one spatial reference system (SRS) to another. The return value is a geometry of the same type as the input geometry with all coordinates transformed to the target SRID, target_srid . Transformation support is limited to geographic SRSs, unless the SRID of the geometry argument is the same as the target SRID value, in which case the return value is the input geometry for any valid SRS. 

ST_Transform()  handles its arguments as described in the introduction to this section, with these exceptions: 

•Geometry arguments that have an SRID value for a geographic SRS do not produce an error. 

•If the geometry or target SRID argument has an SRID value that refers to an undefined spatial reference system (SRS), an ER_SRS_NOT_FOUND  error occurs. 

•If the geometry is in an SRS that ST_Transform()  cannot transform from, an ER_TRANSFORM_SOURCE_SRS_NOT_SUPPORTED  error occurs. 

•If the target SRID is in an SRS that ST_Transform()  cannot transform to, an ER_TRANSFORM_TARGET_SRS_NOT_SUPPORTED  error occurs. 

•If the geometry is in an SRS that is not WGS 84 and has no TOWGS84 clause, an ER_TRANSFORM_SOURCE_SRS_MISSING_TOWGS84  error occurs. 

•If the target SRID is in an SRS that is not WGS 84 and has no TOWGS84 clause, an ER_TRANSFORM_TARGET_SRS_MISSING_TOWGS84  error occurs. 

ST_SRID( g , target_srid )  and ST_Transform( g , target_srid )  differ as follows: 

• ST_SRID()  changes the geometry SRID value without transforming its coordinates. 

• ST_Transform()  transforms the geometry coordinates in addition to changing its SRID value. 

mysql> SET @p = ST_GeomFromText(’POINT(52.381389 13.064444)’, 4326); mysql> SELECT ST_AsText(@p); +----------------------------+ | ST_AsText(@p) | +----------------------------+ | POINT(52.381389 13.064444) | +----------------------------+ mysql> SET @p = ST_Transform(@p, 4230); mysql> SELECT ST_AsText(@p); +---------------------------------------------+ | ST_AsText(@p) | +---------------------------------------------+ | POINT(52.38208611407426 13.065520672345304) | +---------------------------------------------+ 

## • ST_Union( g1 , g2 ) 

Returns a geometry that represents the point set union of the geometry values g1  and g2 . The result is in the same SRS as the geometry arguments. 

As of MySQL 8.0.26, ST_Union()  permits arguments in either a Cartesian or a geographic SRS. Prior to MySQL 8.0.26, ST_Union()  permits arguments in a Cartesian SRS only; for arguments in a geographic SRS, an ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS  error occurs. 

