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

34
votes
5answers
6k 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 ...
23
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 ...
20
votes
3answers
8k 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 ...
19
votes
2answers
394 views

Precision when working with spatial data in GIS

Is there a basic or introductory study that examines and compares the precision of spatial data when working with varying precison of the data input, like having 1, 2, ... decimal places? with the ...
17
votes
5answers
8k 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 ...
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)?
14
votes
1answer
658 views

Monte Carlo simulation using QGIS and pgRouting on optimal sidewalk construction

I am new to spatial analysis and would appreciate some general direction on a project I am attempting, outlined below (I am starting from scratch). GOAL: To find the best locations to install 2000 ...
13
votes
2answers
993 views

What is the approximate error of the Pythagorean Theorem vs. Haversine Formula in measuring distances on a 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 ...
13
votes
4answers
4k 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
3k 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 ...
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 -- ...
12
votes
3answers
414 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. ...
10
votes
4answers
7k 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 ...
10
votes
2answers
988 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 ...
10
votes
5answers
3k views

Which tools and methods can be used to create isochrones?

I'd like to get an idea for what's involved in creating isochrones for a series of sites, with a reasonable degree of accuracy to the estimates. A general outline would be great, though my scenario ...
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 ...
9
votes
3answers
882 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 ...
9
votes
5answers
11k views

How to find the distance of a point along a 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
1answer
216 views

Measuring distances between simultaneous points

I am working with GPS data and so I have UTM's with DATE/Time information. I have 2 groups of species (moose and wolves). I want to join the information from moose to wolves that match in time. So, ...
8
votes
3answers
5k 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
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 ...
8
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 ...
8
votes
4answers
7k views

How do I calculate the bounding box for given a distance and latitude/longitude

Hi need to be able to calculate a bounding box or circle for a Given WGS84 latitude and WGS84 longitude, and distance but have no Idea where to start! The distance from the start lat Lon would be 10KM ...
8
votes
3answers
549 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 ...
8
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
3answers
712 views

What kinds of line segments/edges require high accuracy in a true surface-of-the-ellipsoid representation?

I've been musing (and doing prototype coding) for a 'projection free' geographic codebase with your basic point, line & polygon primitives. Rather than dealing with all the sacrifices that come ...
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 ...
8
votes
1answer
385 views

Calculating distance from points to different class in raster

I am looking for some advice on how to calculate the distance from a point to a different class of a raster. Specifically, I have observations (points) of animal use overlaid on land cover data. For ...
8
votes
1answer
682 views

PostGIS - Calculate progressive distance between points on a GPX path

I am attempting to build an elevation profile using PostGIS-PostgreSQL only. I have imported GPX data in my PostGis database, so now I have a table full of the GPS coordinates of the track and the ...
8
votes
1answer
205 views

How to automatically reduce polygon size?

I am working with two polygon layers (counties & states) which I will 'intersect' to find which counties are within which states. Due to data inaccuracies I have to change all county polygons and ...
8
votes
3answers
308 views

New to ArcGIS and want to compute distance between two points “as the fish swims”

We have a layer named Hydrography which is the water area for a given assignment. I have a station point and a target point. I need to compute the distance between those two points but inside of the ...
8
votes
2answers
1k views

Calculate Distance between a Polygon and a Point Along a Path

I am very new to ArcGis and am trying to figure out how to do this. Basically, this is what I am trying to do: I have a map of Canada and in it I have polygons representing areas (each about the ...
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. ...
7
votes
3answers
302 views

How to check if parcel is located by golf course

Is there any simple way for me to run millions of parcels through some type of script to see if a shape file parcel is on a golf course? For example if I have a layer that has all the golf courses and ...
7
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 ...
7
votes
2answers
426 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 ...
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 ...
7
votes
3answers
222 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 ...
7
votes
2answers
441 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
2answers
129 views

Which SRS to use for global distance queries?

I have a database with a lot of points in WGS84. Now I am building an cache that performs NN and points in range queries using a KDtree. The point [sic] is that the search radius will be provided in ...
7
votes
1answer
574 views

Appropriate distance metric for spatial clustering of geographic coordinates

I have a set of locations in geographic coordinates, and I would like to group the points using hierarchical clustering followed by tree-cutting at various "heights" in order to calculate group-wise ...
7
votes
1answer
663 views

Problem analysing movement using cost surfaces (involving ArcGIS's Path Distance-tool)

I would like to analyse hypothetical movement (on foot) in a landscape as based on energy expenditure, but I have run into some trouble that I am hoping that you could help me with. I have tried to do ...
6
votes
4answers
444 views

How to calculate the “depth” of a linestring using postgis

I have linestring features, which look like bent linestrings, hemicycles or convex or concave linestrings. In the moment I can select the distance between the startpoint and endpoint of each feature. ...
6
votes
2answers
259 views

Metric/parameters to compare length of polyline

What would be a good metric to compare the length of two polylines? A very naive approach would be to define a maximum delta which the two lines can differ. I'm looking for more approaches. For ...
6
votes
1answer
564 views

Is it impossible to measure Right of Way in ArcGIS?

I'm helping bring CAD people into ArcGIS so that everyone throughout the company is on the same page and there is one database for everything. Right now, one of the biggest hurdles is making sure all ...
6
votes
2answers
333 views

how to find the point in a country furthest from a boundary

i'm trying to find the point in south africa furthest from the sea or a landward boundary. my method thus far: i obtained a first guess at the centre of the inscribed circle and the three segments ...
5
votes
5answers
691 views

Getting a square mile bounding box anchored by coordinates?

Let's say I have a lat/lng coordinate pair. I want to determine the coordinates that would create a square mile box. The existing coordintae pair would be the top left of the box, and the coordinate ...
5
votes
2answers
410 views

PostGIS ST_Distance vs. pgRouting

I am looking to create a city directory web app, and the site will need to be able to calculate distances between two geospatial points (like the distance between the user and a restaurant, or the ...
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 ...
5
votes
1answer
4k views

Simple PostGIS ST_Distance query for two points from the same geometry table?

Note: This question was published at Stackoverflow at first. I have a geometry table points_table with SRID 4326 and a few points in it. I need to find a distance between a pair of points (features) ...