Questions tagged [geographic-distance]

Geographical distance is the distance measured along the surface of the earth.

Geographical distance is the distance measured along the surface of the earth.

77 questions
2
votes
3 answers

How to Interpolate Lat/Long Points (Route) between Two Lat Long Points

Lets say we have two addresses that are provided. I grabbed two random ones from the web below: # Google headquarters: google_lat = 37.422131 google_lon = -122.084801 # Apple headquarters apple_lat = 37.33467267707233 apple_lon =…
2
votes
0 answers

Filter by distance from coordinates (Django over MariaDB)?

I have a collection of records with latitude & longitude coordinates in my database. Is there a straightforward way to filter for other objects within some specified radius of a given object? Use would be for a method place.get_nearby(rad_km=1.3)…
2
votes
2 answers

Calculating distance in kilometers between coordinates

I'm trying to calculate distance in kilometers between two geographical coordinates using the haversine formula. Code: Dim dbl_dLat As Double Dim dbl_dLon As Double Dim dbl_a As Double dbl_P = WorksheetFunction.Pi / 180 dbl_dLat = dbl_P *…
2
votes
1 answer

Finding distance between lat-long saved in points

I'm saving coordinates of places as Points which I get from Google API. I want to compute the distance between two of those points. I tried to use GeoCoordinate class for that, but the class requires lat and long in degrees. Is it possible to…
Arjun Menon
  • 553
  • 2
  • 8
  • 29
2
votes
1 answer

Laravel 4: How do I translate this complex raw geographic SQL query into using Eloquent?

So I'm trying to find the closest points to another particular point within a certain distance, and I'm using the haversine formula for this. The raw query itself is: SELECT id, ( 3959 * acos( cos( radians(input_lat) ) * cos( radians( map_loc_lat )…
marked-down
  • 9,958
  • 22
  • 87
  • 150
2
votes
1 answer

Calculate SW & NE Lat/Longs of Square X miles from a Centre Lat/Long

I am working on getting data out of the Noaa API. When talking to the Noaa API you can get a list of weather stations within a square. They call them "extents" and they are a 2 sets of lat/longs. The bottom left lat/long and the top right…
Trevor Daniel
  • 3,785
  • 12
  • 53
  • 89
2
votes
2 answers

Drawing a Circle with a Radius of a Defined Distance in a Map

I am able to plot a map and caption a specific point: library(maps) map("state") text(-80.83,35.19,"Charlotte",cex=.6) I can also plot a circle centered around that point: symbols(-80.83,35.19,circles=2, add=TRUE) However, I would like to control…
nathanbeagle
  • 47
  • 1
  • 5
2
votes
1 answer

Fuzzy matching of coordinates

I have two datasets, one of them containing the coordinates of people's addresses (addresses), and the other one containing the coordinates of rainfall in certain locations (rain). The coordinates are standard lat and lon. I would like to merge…
aesir
  • 565
  • 2
  • 13
  • 23
2
votes
2 answers

What is the fastest way to select nearest geographical place from mysql database?

I have a table in a MySQL database containing geographic coordinates and other information about places. Each row in the table represents a geographical place and has coordinates such as: Latitude = 45.05235 and Longitude = 8.02354 which is a place…
BastiaanWW
  • 1,259
  • 4
  • 18
  • 34
1
vote
2 answers

Finding nearest neighbor between 2 sets of dated points

I have 2 sets of points, set1 and set2. Both sets of points have a data associated with the point. Points in set1 are "ephemeral", and only exist on the given date. Points in set2 are "permanent", are constructed at a given date, and then exist…
Zach
  • 29,791
  • 35
  • 142
  • 201
1
vote
0 answers

Calculating weighted average using (latitude, longitude and altitude) of two nearest weather stations

I want to calculate the weighted average of temperatures of the nearest weather stations around a city. I have data on the latitude, longitude, altitude and temperature of some stations. Mostly, I'm trying to find the formula used by the…
1
vote
1 answer

Calculating Geographic distances between each row of X,Y points in a python dataframe

Python Beginner here. I have a python dataframe consisting of X,Y points that looks similar to this: What I want to do is look at row 1 and find the distance between row 1 and row 2 and output the new distance between those 2 X,Y locations to a new…
1
vote
3 answers

How do I calculate the distance between two points (vertically) specified by latitude and longitude and Altitude?

I have checked other questions but nobody is talking about how to calculate the height of an object using GPS, Consider I have two data points vertically (not horizontally which calculates the distance), I have (lat1,lon1,alt1) and (lat2,lon2,alt2).…
1
vote
1 answer

MySQL query to get route between 2 lat-lng coordinates

I'm looking for a query to get the route between two points. I have this link, let's say: example.com/any? lat1 = 31.0000 & lng1 = 31.0000 & lat2 = 31.0000 & lng2 = 31.0000 So inside the function, I want to write a query that goes to the table…
1
vote
0 answers

How can I adapt my radius search by postcode/zipcode to radius search by town?

We currently have a working script to return a list of all our products within a radius of a postcode/zipcode. It searches for all products that have locations in area codes within the @miles parameter of @lookingfor postcode, also returning the…
cloudsafe
  • 2,444
  • 1
  • 8
  • 24