I'm trying to calculate the distance between two lat long points in Oracle using SDO_GEOM Package. Most of the solutions I read on the internet suggests below query:
select sdo_geom.sdo_distance(
sdo_geometry(2001, 4326, sdo_point_type(40.0, 10.0, null), null, null),
sdo_geometry(2001, 4326, sdo_point_type(40.0, 11.0, null), null, null),
0.01,
'unit=KM'
) as distance
from dual;
However, when I use an online tool to validate the result, it seems to be incorrect:
Try (40,10), (40,11) on:
Any idea why the distance calculation is incorrect even if I'm using a geographic coordinate system (4326) in the query?