Questions tagged [distance]

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

Filter by
Sorted by
Tagged with
59 votes
7 answers
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 ...
Jason Whitehorn's user avatar
22 votes
3 answers
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 ...
arzandia's user avatar
  • 306
77 votes
2 answers
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 ...
Jeff B's user avatar
  • 935
35 votes
5 answers
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 ...
Egidi's user avatar
  • 3,798
46 votes
3 answers
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-...
Afriza N. Arief's user avatar
20 votes
2 answers
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 ...
djq's user avatar
  • 16.2k
59 votes
6 answers
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 ...
Lazer's user avatar
  • 701
26 votes
7 answers
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 ...
Heinz's user avatar
  • 1,545
85 votes
2 answers
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 ...
ABC's user avatar
  • 961
45 votes
6 answers
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 ...
nohat's user avatar
  • 555
41 votes
6 answers
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 ...
H.Wiener's user avatar
  • 1,009
8 votes
3 answers
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 ...
Tim's user avatar
  • 89
13 votes
5 answers
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 ...
Gabz's user avatar
  • 131
67 votes
9 answers
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'...
RedM's user avatar
  • 1,505
25 votes
5 answers
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 ...
user avatar
15 votes
4 answers
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 ...
Sylvia's user avatar
  • 151
9 votes
5 answers
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'...
Kerrie's user avatar
  • 91
21 votes
3 answers
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)?
Jon Bringhurst's user avatar
15 votes
1 answer
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 ...
user1702401's user avatar
  • 2,861
5 votes
2 answers
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?
Jennifer Lopez's user avatar
2 votes
4 answers
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" - &...
jeepin_gypsy's user avatar
43 votes
9 answers
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 ...
pindleskin's user avatar
15 votes
2 answers
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 ...
mic_cord's user avatar
  • 499
13 votes
3 answers
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 ...
Radar's user avatar
  • 10.7k
9 votes
3 answers
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. ...
NickN's user avatar
  • 385
8 votes
3 answers
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 ...
LarsVegas's user avatar
  • 2,526
8 votes
4 answers
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 ...
Daniel Mutton's user avatar
39 votes
7 answers
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 ...
kaptan's user avatar
  • 491
12 votes
3 answers
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 ...
e-falcon's user avatar
  • 123
11 votes
3 answers
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. ...
sixtyfootersdude's user avatar
11 votes
3 answers
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 ...
zundarz's user avatar
  • 213
4 votes
2 answers
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 ...
opensas's user avatar
  • 275
38 votes
3 answers
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 ...
Amos Budde's user avatar
17 votes
5 answers
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 ...
Adam Matan's user avatar
  • 6,790
13 votes
4 answers
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 ...
gis_student's user avatar
11 votes
2 answers
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 ...
Karl P's user avatar
  • 213
8 votes
1 answer
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 ...
user avatar
7 votes
4 answers
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 ...
Lena's user avatar
  • 69
6 votes
2 answers
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 ...
Ian's user avatar
  • 79
5 votes
2 answers
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 ...
John Doe's user avatar
  • 153
5 votes
2 answers
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 ...
SNT's user avatar
  • 3,339
4 votes
2 answers
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 ...
Izumi Kawashima's user avatar
4 votes
1 answer
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 ...
Roman Dostál's user avatar
3 votes
2 answers
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 ...
Sarah's user avatar
  • 31
2 votes
2 answers
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 ...
ericg's user avatar
  • 121
0 votes
1 answer
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 ...
Layke's user avatar
  • 125
39 votes
4 answers
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: ...
dan2k3k4's user avatar
  • 575
27 votes
6 answers
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 -- ...
Christopher Schmidt's user avatar
18 votes
1 answer
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 ...
User's user avatar
  • 1,193
17 votes
6 answers
41k views

Finding distance between two points with GeoSeries.distance

When I want the distance between two points [(117.454361,38.8459879),(117.459880 ,38.846255)] (longitude,latitude) on the earth, I take the GeoSeries.distance method, but the method does not give me ...
CJ Xu's user avatar
  • 331

1
2 3 4 5 6