orbisgis / h2gis

A spatial extension of the H2 database.
http://www.h2gis.org
GNU Lesser General Public License v3.0
208 stars 63 forks source link

Mixed SRID behavior in ST_DISTANCE vs. ST_DISTANCESPHERE #1292

Closed apano-on closed 2 years ago

apano-on commented 2 years ago

ST_DISTANCE and ST_DISTANCESPHERE exhibit different behavior when inputs with mixed SRIDs are provided:

ST_DISTANCE --> SQLException("Operation on mixed SRID geometries not supported"). See here ST_DISTANCESPHERE --> null. See here.

Shouldn't the behavior be consistent? In particular the error for ST_DISTANCE is more informative, while for ST_DISTANCESPHERE it is not very informative. I do not know if there is any official guideline or recommendation.

ebocher commented 2 years ago

Thanks for reporting. ST_DISTANCESPHERE must have the same behaviour than ST_DISTANCE

ebocher commented 2 years ago

Fixed thanks