# Questions tagged [distance]

The measure of separation between two entities or locations that may or may not be connected, such as two points.

270 questions
Filter by
Sorted by
Tagged with
158k views

### Calculating Latitude/Longitude X miles from point?

I am wanting to find a latitude and longitude point given a bearing, a distance, and a starting latitude and longitude. This appears to be the opposite of this question (Distance between lat/long ...
38k views

### Adding Direction and Distance into attribute table in QGIS

I just want to add direction (Bearing: i.e N 25 35 E) and Distance (Length: 125 meters) as my new field in polyline/line data. Is there a Plugin to generate these fields? I tried to used Export/Add ...
• 306
21k views

### How accurate is approximating Earth as sphere?

What level of error do I encounter when approximating the earth as a sphere? Specifically, when dealing with the location of points and, for example, the great circle distances between them. Are ...
• 935
46k views

### PostGIS nearest points with ST_Distance, kNN

I need to obtain on each element on one table the closest point of another table. The first table contains traffic signs and the second one the Entrance Halls of the town. The thing is that I can't ...
• 3,798
45k views

### Why is law of cosines more preferable than haversine when calculating distance between two latitude-longitude points?

In fact, when Sinnott published the haversine formula, computational precision was limited. Nowadays, JavaScript (and most modern computers & languages) use IEEE 754 64-bit floating-...
15k views

### Calculating distance to points in QGIS

Is there a way of calculating the distance to the nearest points in QGIS? In ArcGIS Desktop there is a function called Euclidean Distance, which can take an input vector or raster, and generate a ...
• 16.2k
40k views

### Why is the 'straight line' path across continent so curved?

This is the result of mapping the straight line path from a point in US to Poland using Distance Measurement Tool. Also, planes from Asia to US would travel almost over North Pole. Why is the path ...
• 701
62k views

### Creating points in specified distance along line using QGIS

I want to use QGIS creating points along the line, but in specified distance. I found two GRASS tools in SEXTANTE Toolbox： v.to.points v.segment I tried v.to.points, setting the maximum distance ...
• 1,545
488k views

### Calculating longitude length in miles

Suppose I have the geographic coordinates of "Saratoga, California, USA" as Latitude: 37°15.8298′ N Longitude: 122° 1.3806′ W I know from here that in the case of latitude 1° ≈ 69 ...
• 961
61k views

### Trilateration using 3 latitude/longitude points, and 3 distances?

I want to find out an unknown target location (latitude and longitude co-ordinates). There are 3 known points (latitude and longitude co-ordinate pairs) and for each point a distance in kilometers to ...
• 555
116k views

### Drawing lines from points in QGIS

I have a point layer and need to draw a line passing through or in the vicinity of the points (up to 0.5m distance between the point and the line). The nodes of the line will receive the attributes of ...
• 1,009
21k views

### Creating points based on distance and bearing from survey point using QGIS?

I am plotting witness tree data to calculate pre-settlement tree density. I have a shapefile with points along section lines (square miles) at each half mile. I am making another table that contains ...
• 89
15k views

### Calculating distance of point along line using QGIS

I have a polyline (movement path) and points recorded along the line. I would like to calculate for each point the distance along the line in QGIS. I hope for a result which will add a new column to ...
• 131
75k views

### Finding nearest point in other GeoDataFrame using GeoPandas

I've got two geodataframes: import geopandas as gpd from shapely.geometry import Point gpd1 = gpd.GeoDataFrame([['John',1,Point(1,1)],['Smith',1,Point(2,2)],['Soap',1,Point(0,2)]],columns=['Name','ID'...
• 1,505
44k views

### Finding distance of point along polyline using ArcGIS Desktop?

We need to find the distance of a series of point along a given polyline. We have a polyline dataset repsenting rivers in a catchment, broken up into river reaches (FID 1 through 35 for example). We ...
51k views

### Calculating minimum distance between points and polygons in QGIS?

I have two vector layers: one point and one polygon and I want to calculate the minimum distance of each point from the polygons (ie the distance from the closest point of the closest polygon). Is ...
• 151
14k views

### How to calculate distances in a point sequence?

I'm looking for help calculating the distance between a sequence of points that are in a single Shapefile in QGIS. Below is what my data look like and a blank distance column I've added to show how I'...
• 91
7k views

### Finding distance between two coordinates in ellipsoid?

I have two sets of latitude and longitude. How do I find the distance between the two locations if I assume the earth is a perfect ellipsoid (with an eccentricity of 0.0167)?
20k views

### Calculating distance scale factor by latitude for Mercator

This was really inconvenient topic to google out - so I'm asking for clarification, did I understood things correctly. I'm talking about measuring short distances in Mercator projection (3857). You ...
• 2,861
3k views

### Performing Point Distance analysis using Basic level license of ArcGIS Desktop?

I am using ArcView (ArcGIS Desktop Basic) 10.1 and I need to perform a point distance analysis. What are the steps to determine the distance from A to B-Z, B to A-Z, C to A-Z, etc?
7k views

### Splitting multiple polylines by distance in ArcMap

Is there a method to split thousands of polylines by employing a tool like the "Editor" - "Split" method and using distance, in ArcMap? When I utilize the "split" - &...
96k views

### Generating random locations nearby?

I am trying to create random locations nearby my location. What i want is to create random latitude/longitude pairs inside a 200 meters circle surrounding my location. This is the formula i came up ...
• 433
19k views

### Calculating shortest distance from point to line using QGIS?

What is the best method to calculate the distance from the nearest road for a series of address points in QGIS, having a very big dataset? (QGIS 2.0.1, Win XP) I read the answers to previous similar ...
• 499
5k views

### Connecting line features and determining the length of the longest line

I have a line feature (see image) representing a river that I created using the Stream_to_Feature tool. The attribute table contains several records representing different lines - the problem is the ...
• 10.7k
4k views

### Calculating all distances from single points to multiple polygons [closed]

I have two layers: a point layer defining properties (95 objects), and a polygon layer defining plots of land associated with the properties (211 objects). Each point relates to one or more polygons. ...
• 385
10k views

### Splitting lines automatically at specific distances using ArcGIS Desktop?

I have a set of polylines which I need to split at varying distances from their starting points. In general, I'm looking for a something similar to the SPLIT function within the editor tool. There ...
• 2,526
31k views

### Creating buffer circle x kilometers from point using Python?

I am wanting to create a circle with an inputted radius around a point of predetermined latitude and longitude. I've been trying to use the formula found in this post which uses an algorithm ...
54k views

### Clustering spatial data in R? [closed]

I have bunch of data points with latitude and longitude. I want to use R to cluster them based on their distance. I have already taken a look at this page and tried clustTool package. But I am not ...
• 491
4k views

### What is the right solution (and map projection) to compute distances between points located all over the World?

After my study on map projection I realized that it is very difficult to choose a projection that allows to compute simultaneously the distances between a great deal of points if these points are ...
• 123
11k views

### Distance between lat/long points

I am attempting to calculate the distance between two latitude/longitude points. I have a piece of code that mostly works that I yanked from this post but I do not really understand how it works. ...
3k views

### Finding most remote spot in Eastern United States?

I have this hunch that I could travel no more than 50 miles from the most remote spot in the Eastern United States (east of the Mississippi River), in the direction of the nearest road, and find a ...
• 213
6k views

### Postgis, get the points that are x meters near another point, in meters

I'm trying to find the points within a certain distance, in meters, from another point. I'm using the function ST_Buffer, but I don't get how to express the distance in meters. I'm trying with ...
• 275
18k views

### What is approximate error of Pythagorean Theorem vs. Haversine Formula in measuring distances on sphere at various scales?

Many people when first trying to calculate distances between two longitude / latitude pairs ask if Pythagorean theorem works as an appropriate distance function. Most often people answer "no, the ...
• 503
35k views

### Difference between Vincenty and great-circle distance calculations?

Python's geopy package features two distance measurements techniques: Great Circle and Vincenty's formulae. >>> from geopy.distance import great_circle >>> from geopy.distance ...
• 6,790
4k views

### Calculating line with the longest distance inside polygon in QGIS

I want to calculate the "diameter" of polygons in QGIS. The "diameter" is defined as the distance between the two most distant points of the polygon. I couldn't find a fitting ...
• 253
6k views

### Measuring distance in spherical Mercator vs zoned UTM

I've got points in WGS84 lat/long and I'd like to measure "small" (less than say 5km) distances between them. I can use the haversine formula from http://www.movable-type.co.uk/scripts/latlong.html ...
• 213
6k views

### Calculate distances between series of points in postgis

I have a postgres/postgis table containing a series of sequential points. I want to add a new column to the table which contains the distance between each point and the first one, and so forth until ...
43k views

### Measuring distance between points in QGIS

I have a layer with about 500 single points. Now I want to measure the distance between each of these points and one specified observation point. I need the distance to show how far away from the ...
• 69
1k views

### Is there a way to calculate closest distances to a point without using Near Analysis?

I frequently get asked to calculate distances from a specific point (A drilling well in the middle of the sea for example) to a number of Environmental layers (Protected Areas, Pipelines, Other wells ...
• 79
9k views

### Formula for calculating short distances in UTM?

I'm fairly new at calculating distances with precision, but I wanted to know what is the best formula for calculating short distances in UTM coordinates. The distances that I'am calculating are all ...
• 153
15k views

### What are units of Distance Matrix tool results in QGIS?

I have a point data set. Now there are cluster of points based on a field. So I take out one such cluster which has points with same field.I want to find distance between all the points in cluster and ...
• 3,339
2k views

### Variation of algorithms to find point from another point with bearing and distance

There are several algorithms to calculate distance between two latitude/longitude points. Haversine Hubeny Lambert-Andoyer Vincenty's formulae for inverse problem But there are not so many ...
684 views

### Average walking distance [closed]

I have OSM network (or city created network, either will work just fine), then I have point layers that corresponds to buildings (or rather entrances) with the number of inhabitants and lastly a point ...
• 515
5k views

### Distance between points along polyline ArcGIS for Desktop?

I'm using ArcGIS 10.3 (Desktop), and I'm trying to measure the distance between points following a path determined by a set of polylines. Hand measurement is not a viable option-- there are ~7500 ...
• 31
2k views

### Computing distance between two spherical Mercator points

I am computing the Mercator points according to the top answer at Convert latitude/longitude point to a pixels (x,y) on Mercator projection. Now that I have two Mercator points on a spherical ...
• 121
1k views

### Improving our spatial data by calculating "Close to Coastline", "Close to Park", "Close to Stadium" etc [closed]

A quick background for context is maybe helpful for this. Essentially we have "vacation rentals" and I would like to add additional data to them automatically. We create booking websites for ...
• 125
95k views

### Return all results within a 30km radius of a specific lat/long point?

I have a table with a column the_geom which contains data similar to: ...
• 575
22k views

### What tools in Python are available for doing great circle distance + line creation?

I need to use Python to create a great circle distance -- both a number, and preferably some kind of 'curve' that I can use to draw in a client-side map. I don't care about the format of the curve -- ...
• 2,584
11k views

### What is difference between ST_DWithin and ST_Distance for proximity search in PostGIS?

I have records stored in a table with latitude/longitude coordinates stored in a geometry field. I want to find all records nearby a user supplied reference point. Note "nearby" probably means less ...
• 1,193