Tagged Questions

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

16k 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 ...
5k 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 ...
22k 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-...
25k 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 ...
41k 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 ...
15k views

How to cluster spatial data in R?

I am very new to R. 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 ...
483 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 ...
27k 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 ...
5k 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 ...
23k 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 ...
7k 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 -- ...
3k 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)?
6k 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 ...
975 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 ...
9k 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 ...
1k 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. ...
16k 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 ...
2k 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 ...
4k 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 ...
149 views

How big does a circular geofence need to be for the curvature of the earth to matter? [duplicate]

I'm working on adding geofences to a mobile application. I know the proper way of calculating distance between two points on a sphere is using the great-circle or Haversine formula. I don't know if ...
42k 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. ...
2k 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 ...
3k 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 ...
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 ...
1k views

Calculating distance from points to different class in raster using ArcGIS Spatial Analyst?

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. ...
2k 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 ...
4k 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. ...
6k views

PostGIS nearest point with ST_Distance

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 ...
5k 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 ...
9k 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) ...
2k 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 ...
929 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 ...
340 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, ...
1k views

Analysing movement using cost surfaces with ArcGIS 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 ...
5k views

Finding minimum edge to edge distance of polygons using ArcGIS Desktop?

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 ...
5k 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 ...
5k views

Geodjango- get the distance between 2 points

What I want to do is quite simple, I have 2 locations defined by gps coords, lat / long like returned by google maps: http://gmaps-samples.googlecode.com/svn/trunk/geocoder/singlegeocode.html I need ...
859 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 ...
2k 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 ...
6k 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 ...
869 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 ...
2k 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 ...
1k views

Calculating all distances from single points to multiple polygons

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. ...
2k 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 ...
1k 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 ...
1k 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 ...
638 views

How do I calculate Manhattan distance with PostGIS?

I am using the ST_Distance function to calculate the distance between two geometries (a train station and a building) Since I know that all buildings and all train stations are in Chicago, which has ...
656 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 ...