Find points in four directions of a latitude and longitude at certain distance

I am working on showing four pointers around a location (a pointer with certain latitude and longitude), which can be selected on a map.

So i get the location's lat and long values from https://nominatim.org/ api. What i'm trying to work on is get four point's lat and long value from the selected location. These four points are simply 100 meters in distance from the current point.

So now the issue here is how do i calculate or find a point east, west, north and south of the selected location's point (100 meters from the current lat long position). i have checked different options like point in polygon algorithm here https://assemblysys.com/php-point-in-polygon-algorithm/, or trying to draw a circle around the selected point and then getting four points on that circle's circumference, however the issue is still that i'm not able to know if the point which i have got is in which direct from the selected location. Is it east of location, south or west etc.

Any help is appreciated about identifying that a certain point is in which direction of the selected point.



from Recent Questions - Stack Overflow https://ift.tt/39Ezw1f
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation