General Conditions for Spatial Casts • LineString • Polygon • MultiPoint • MultiLineString • MultiPolygon In spatial casts,  GeometryCollection  and  GeomCollection  are synonyms for the same result type. Some conditions apply to all spatial type casts, and some conditions apply only when the cast result is to have a particular spatial type. For information about terms such as “well-formed geometry,”  see Section 11.4.4, “Geometry Well-Formedness and Validity” . •General Conditions for Spatial Casts •Conditions for Casts to Point •Conditions for Casts to LineString •Conditions for Casts to Polygon •Conditions for Casts to MultiPoint •Conditions for Casts to MultiLineString •Conditions for Casts to MultiPolygon •Conditions for Casts to GeometryCollection •The result of a cast is in the same SRS as that of the expression to cast. •Casting between spatial types does not change coordinate values or order. •If the expression to cast is  NULL , the function result is  NULL . •Casting to spatial types using the  JSON_VALUE()  function with a  RETURNING  clause specifying a spatial type is not permitted. •Casting to an  ARRAY  of spatial types is not permitted. •If the spatial type combination is permitted but the expression to cast is not a syntactically well- formed geometry, an  ER_GIS_INVALID_DATA  error occurs. •If the spatial type combination is permitted but the expression to cast is a syntactically well-formed geometry in an undefined spatial reference system (SRS), an  ER_SRS_NOT_FOUND  error occurs. •If the expression to cast has a geographic SRS but has a longitude or latitude that is out of range, an error occurs: 2240 General Conditions for Spatial Casts These conditions apply to all spatial casts regardless of the result type: