Find your nearest GPS Navigation Route

I am developing a site for a pool of cars. To do this, I created a database that has different route parameters selected by different users. These routes are stored in the database as a geography data type. To access the data, I used the Entity Framework. In C # code, I used the DBGeography data type to handle routes.

I have a requirement that a user can select one route and identify users who have chosen the same / nearest route that is stored in the database. How to achieve this?

+4
source share
1 answer

You can use STDistance in SQL to determine the distance between geography or DbGeography.Distance if you are working in EF (example here ).

+2
source

Source: https://habr.com/ru/post/1528034/


All Articles