I was hoping to possibly deprecate a stored procedure that is finding facilities within a provided radius of a latitude and longitude coordinate. The sproc has acos, sin and cos values right in the where clause like:
WHERE (acos(sin(@vLAT_RAD) * sin(FAC.LATITUDE_RADIANS) + cos(@vLAT_RAD) * cos(FAC.LATITUDE_RADIANS) * cos(FAC.LONGITUDE_RADIANS - @vLONG_RAD)) * @vEARTH_R) <= @pRADIUS
We will likely keep using the sproc rather than loading our entire data set into memory and filtering in memory as our data set is actually quite large.
Is this SQL Server or other? SQL Server should have support for Math.Sin and so forth. https://github.com/aspnet/EntityFrameworkCore/blob/master/src/EFCore.SqlServer/Query/ExpressionTranslators/Internal/SqlServerMathTranslator.cs
Most helpful comment
Is this SQL Server or other? SQL Server should have support for
Math.Sinand so forth. https://github.com/aspnet/EntityFrameworkCore/blob/master/src/EFCore.SqlServer/Query/ExpressionTranslators/Internal/SqlServerMathTranslator.cs