-2

I have list of latitude and longititude value list in orcle database table. In Android app i want to mark those locations which take radius value bellow 5Km around my current geo location.How can I do it? Any one who can solve the proble please give me sample android code.

  • 1
    [This](https://stackoverflow.com/questions/8049612/calculating-distance-between-two-geographic-locations) may help – Nipun Dec 03 '18 at 12:10

2 Answers2

0

I use firebase db with geoFire to resolve this issue. If you can get every point from your db you can check "distance" like:

double distance = SphericalUtil.computeDistanceBetween(pointCoordinate, myCoordinate);

from import com.google.maps.android.SphericalUtil;. But it can be problem if you have big db with lot of points.

Vadim Eksler
  • 865
  • 9
  • 24
  • Also look at this article https://technology.amis.nl/2017/05/17/oracle-database-standard-geo-location-support-using-locator-included-in-every-edition/ – Vadim Eksler Dec 03 '18 at 12:06
0
 double distanceInMiles = Utils.calculateDistanceBetweenGeoPoints(
                                    currentLocation.getLatitude(),
                                    currentLocation.getLongitude(),
                                    otherLatitude,
                                    otherLongitude);
Kevin Kurien
  • 812
  • 6
  • 14