For example, using these two very well-known exotic locations…
- #1: Innovations HQ
30 Isabella St Pittsburgh PA 15212
Latitude and Longitude: (40.447914, -80.003696)
- #2: Vertica HQ
150 Cambridgepark Dr Cambridge MA 02140
Latitude and Longitude: (42.394914, -71.146388)
Code: Select all
dbadmin=> SELECT distance(40.447914, -80.003696, 42.394914, -71.146388) distance_to_Vertica_HQ;
distance_to_Vertica_HQ
------------------------
769.188185254648
(1 row)
Code: Select all
dbadmin=> SELECT distancev(40.447914, -80.003696, 42.394914, -71.146388) distance_to_Vertica_HQ_v;
distance_to_Vertica_HQ_v
--------------------------
770.949054725888
(1 row)