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

learn more… | top users | synonyms

10
votes
5answers
8k views

Calculating Lat/Lng 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 ...
20
votes
3answers
9k 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 ...
36
votes
5answers
7k 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 ...
24
votes
2answers
1k views

How accurate is approximating the Earth as a 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 ...
9
votes
4answers
2k 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 ...
15
votes
3answers
2k views

How do I find the distance between two coordinates in an ellipsoid?

Lets say 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)?
5
votes
5answers
2k 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 ...
12
votes
6answers
3k 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 -- ...
5
votes
1answer
2k 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 ...
9
votes
3answers
1k 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 ...
7
votes
2answers
2k 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. ...
5
votes
1answer
2k views

Calculating distance to points in QGIS

Is there a way of calculating the distance to the nearest points in QGIS? In ArcGIS there is a function called Euclidean Distance, which can take an input vector or raster, and generate a raster of ...
18
votes
5answers
10k views

Trilateration using 3 latitude and 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 ...
10
votes
5answers
13k views

Finding distance of point along polyline?

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 ...
9
votes
3answers
953 views

How can I find the 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 ...
5
votes
1answer
853 views

Shortest distance from point to line (big dataset)

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 ...
6
votes
3answers
4k 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 ...
3
votes
2answers
444 views

What's the 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 ...
4
votes
2answers
4k views

How to use Distance Matrix tool 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 ...
2
votes
2answers
2k views

How to perform trilateration using 3 lat/lon points without distances?

I read this thread Trilateration using 3 latitude and longitude points, and 3 distances explaining about trilateration using 3 latitude and longitude with measured distance. The problem is I want to ...
12
votes
3answers
491 views

How can I represent distance using the dashes or markers of a vector line?

I am a very basic user and dont know the lingo to get to the gist of my question so some background might help. Ive volunteered to create a pre-incident planning system for my rural fire department. ...
8
votes
4answers
3k views

How to find the minimum edge to edge distance of polygons?

I have a a map of about 3000 polygons in ArcGIS 10. I'm looking to find the distance between each one of them. I know how to do it using the lat and long coordinates of the centroid, but I'm looking ...
4
votes
3answers
9k views

Find points within a distance using MySQL

I have a mySQL table with user name, latitude and longitude of the user. I would like to get a list of user who are inside the circle or square of a given latitude and longitude with given distance. ...
9
votes
3answers
7k views

How to generate random locations nearby my location?

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 ...
8
votes
5answers
3k views

Better Distance Measurements in Web Mercator Projection

I am working with an ESRI stack, storing my layers in a sql-spatial-enabled-SDE- geodatabase (Geometry type, Web Mercator-3857). I am building a web mapping application, so by default, the tiles are ...
5
votes
1answer
2k views

How do I perform a proximity search with Postgis?

OK, so I downloaded the Geonames database (cities1000) and wrote a small Ruby program to import them into my table (geo_cities). I then added geography column called geog. So after all of that, I ...
3
votes
2answers
4k views

Calculating the 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 ...
7
votes
2answers
722 views

projection change to create buffer in QGIS

I am about to become desperate... I like to create buffer around several points - if possible - with a declaration of the size in km of these buffers. Just to show you what I am working with: My ...
6
votes
1answer
2k views

QGIS calculate distance of point along a line

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 Quantum GIS. I hope for a result which will add a new ...
5
votes
5answers
11k views

For every point, distance to nearest polygon of type X?

In ArcGIS how might one calculate as an attribute value the distance to the nearest polygon of type X? Say we have a point layer of wildlife observations and we want to know how far each of them is ...
4
votes
3answers
447 views

How to efficiently find points within an elliptical area?

Using PostGIS 2.0.0 I need to filter the results of a function, which returns many POINTs, to find the ones that lie within an elliptical area defined by two points and a distance (all parameters ...
2
votes
2answers
396 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 ...
1
vote
2answers
328 views

Calculating millions of distances with Road Graph

I'm new to GIS but thanks to the answers I got in another question here on GIS stack exchange I was able to increase my knowledge significantly. This question is related to an earlier question I asked ...
1
vote
2answers
602 views

QGIS layers no longer overlay when Enable 'on the fly' CRS transformation is on

My QGIS project has two layers - one retrieved from GADM (administrative boundaries of Guinea Bissau) and another one of the villages collected in the field using GPS Decimal Degrees - D.ddddd. If I ...
13
votes
4answers
5k views

How to cluster spatial data in R?

I am very new to R, so please bear with me : > 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 ...
12
votes
3answers
4k views

Algorithm to find nearest point

I've a list of a few hundred cities with their latitude/longitude. Given another location (also in lat/long) I need to find the nearest city. As I don't use any GIS, by now the obvious algorithm is ...
3
votes
2answers
664 views

Total great circle distance along a path of points (PostGIS)

I am looking for an SQL query that sums the distances between a series of points using PostGIS. The situation is as follows: I have 2 tables: tracks and points. Points belong to a track and thus ...
8
votes
4answers
1k views

Looking for a fast, open-source raster cost-distance function to use in code

I've been scouring the internet for a fast, open-source cost-distance function that I can embed inside my code. The functionality should basically work like the ArcGIS implementation where I can ...
2
votes
3answers
901 views

Calculate min distance between points in PostGIS

I have point layer in PostGIS database. Help please with query which add for each points in layer distance in attribute table between this point and another nearest point. Thanks! Update Calculate ...
10
votes
2answers
1k views

Surface distance on DEM between two coordinates

Given two coordinates on a digital elevation model (DEM), how do I compute the actual distance traveled between the two locations, assuming a straight line route? How will changing the resolution of ...
8
votes
3answers
582 views

Identification of consecutive points within a specified buffer

I have a point file, hourly relocations of an animal, and I want to be able to place a buffer around each point and calculate the number of subsequent points which are within the buffer zone. I am ...
7
votes
5answers
2k views

Calculate distance in km to nearest points (given in lat/long) using ArcGIS

I have two point datasets in ArcGIS, both of which are given in WGS84 lat/lon co-ordinates and the points are spread across the whole world. I would like to find the nearest point in Dataset A to each ...
3
votes
3answers
5k views

Distance between GPS coordinates

Given a database of GPS points, a center GPS location, and a radius R (in meters), how can I find all points in the database that are within a distance of R of the center point? Will the distance ...
9
votes
2answers
2k 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 ...
8
votes
2answers
539 views

How do I group near points with GPS positions?

I'm an IT person so I don't know too much about projections and so on, I hope you can help me. I have made an application for Android that collects a GPS position, so I have the latitude and the ...
7
votes
3answers
223 views

What's a term for Sea Level Distance which is usable by novice users?

I've been using the term Sea Level Distance to describe the total length of a line string where I ignore the elevation and just calculate the distance from point to point along the ellipsoid and sum ...
6
votes
2answers
261 views

Projections appropriate for global analysis that preserve area and that preserve distance (but not necessarily in the same projection)

I am looking for a projection (or a set of projections) that decently preserve distances so that I can buffer every country in the world and have a similar level of minimal distortion for each. I ...
5
votes
2answers
5k views

How to calculate new point coordinates from distance and angle?

I want to calculate the coordinates of a new point. What I have: The source point coordinates, the distance (meters) and the angle For example: I want to create a point within 100 meters and 45 ...
5
votes
1answer
711 views

Get shortest distance between two geometries in ArcPy

I'm using ArcPy and using a cursor to step through one polygon feature class. For each of these 'source' polygons, I am creating a SearchCursor to find all polygons in a second feature class that ...
4
votes
1answer
417 views

Correct use of the terms geographic, path, and Euclidean distance

I often use the terms geographic and Euclidean distance interchangeably when referring to the length of the shortest straight-line distance between two points on a map. Is this correct? I use the ...