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

11
votes
5answers
12k 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 ...
27
votes
2answers
2k 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 ...
22
votes
3answers
11k 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 ...
37
votes
5answers
8k 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 ...
5
votes
5answers
3k 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 ...
9
votes
4answers
3k 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
1answer
1k 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 ...
20
votes
6answers
12k 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 ...
13
votes
6answers
4k 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 -- ...
12
votes
5answers
14k 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 ...
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 ...
10
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. ...
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 ...
5
votes
1answer
3k 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 ...
4
votes
2answers
973 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 ...
2
votes
2answers
712 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 ...
9
votes
3answers
1k 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 ...
3
votes
3answers
5k 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 ...
3
votes
1answer
1k views

WGS point to WGS line segment (great circle) distance

How would I go about resolving this in C#? I have a line segment (great circle distance) defined by two Lon-Lat pairs (call them points A and B). A third point somewhere on the Earth sphere. The ...
2
votes
2answers
359 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 ...
5
votes
5answers
12k 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
2answers
5k 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 ...
13
votes
3answers
609 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. ...
6
votes
3answers
13k 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. ...
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 ...
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
4answers
9k 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 ...
9
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 ...
6
votes
2answers
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
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 ...
2
votes
1answer
73 views

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

I am using ArcView Version 10.1 and I need to perform a point distance analysis like: What is the distance from A to B-Z, B to A-Z, C to A-Z, etc? What are the steps that I take to do this?
7
votes
2answers
975 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 ...
4
votes
3answers
471 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 ...
3
votes
1answer
101 views

Calculate distance between point and linestring and how to represent that on QGIS?

I have loaded my data with osm2pgrouting and I have my network with ways (Linestring) and nodes (Point). The problem is : I have a database of doctors addresses (point) and I should calculate the ...
3
votes
2answers
827 views

Calculating the distance from each point in one layer to the nearest point in another layer

I am trying to find the average distance from several points in a layer to points in another layer. I am using ArcMap Basic - I know there is a way to do this using the Advanced version of ArcMap but ...
2
votes
1answer
637 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 ...
1
vote
2answers
445 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
706 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
6k 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 ...
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 ...
3
votes
2answers
736 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 ...
3
votes
4answers
1k 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
640 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
3k views

Calculate distance in km to nearest points (given in lat/long) using ArcGIS DEsktop and/or R?

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 ...
2
votes
3answers
289 views

Draw line between points from multiple datasets

I have 2 point datasets and want a tool or script to draw a line between all points in one dataset to all the points in the 2nd dataset. Is it possible? I have tried ESRI "Point Distance" and ...