WL#14188: Ellipsoidal ST_Union
ST_Union currently only supports computations in Cartesian spatial reference systems (SRSs). This WL refactors the current implementation for Cartesian SRSs, and adds support for geograhic SRSs.
ST_Union(geometry, geometry) takes two geometries, and returns their union geometry.
The function is implemented for all geometries in all spatial reference systems, both Cartesian and geographic.
- The function MUST return NULL if any of its arguments are NULL.
- If any of the geometry arguments are not a syntactically well-formed geometry, the function MUST raise ER_GIS_INVALID_DATA during function evaluation.
- If any geometry argument is a syntactically well-formed geometry in an undefined SRS, the function MUST raise ER_SRS_NOT_FOUND during function evaluation.
- If the geometry arguments are syntactically well-formed geometries but in different SRSs, the function MUST raise ER_GIS_DIFFERENT_SRIDS during function evaluation.
- If any geometry argument is a geometry in a geographic SRS and a longitude value is not in the range (-180,180] (in degrees -- other limits in other units), the function MUST raise ER_GEOMETRY_PARAM_LONGITUDE_OUT_OF_RANGE. (*)
- If any geometry argument is a geometry in a geographic SRS and a latitude value is not in the range [-90,90] (in degrees -- other limits in other units), the function MUST raise ER_GEOMETRY_PARAM_LATITUDE_OUT_OF_RANGE. (*)
- If one or more geometry arguments are geometrically invalid, the function MUST return a geometry or raise an error. If a geometry is returned then there is no guarantee that this result is correct nor geometrically valid, i.e. it could be any geometry.
- If the geometry arguments are syntactically well-formed within a valid SRS, the function MUST return the union geometry of the two inputs, in the same SRS.
(*) The exact limits will deviate slightly because of floating point arithmetics.
No new files.
No new syntax.
No new commands.
No new tools.
The semantics of interface SQL01 are changed: If the geometry is in a geographic SRS, ST_Union will return a result based on geographical computations. Other computations will remain as they are today.
No new errors or warnings.