There is geopoint array, one point with longitude and latitude as the center and radius. It takes to choose only those ones which are within the radius. One more thing is that the points are close to prime meridian. Can you advise the solution for it or some java libraries?
Asked
Active
Viewed 214 times
0
-
This should be quite simple to do and you'd not need a library for this. Think back to your math classes: how do you determine that a point lies within a circle? You're right: if its distance to the center point is not greater than the radius. Now we have the added complexity of having to deal with geopoints (i.e. points on a sphere) but calculating the distance between 2 of them is still not that hard, e.g. have a look here: https://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-haversine-formula (solution should be easily adaptable to Java). – Thomas Sep 07 '21 at 06:25
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 11 '21 at 15:20