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

3
votes
2answers
154 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 ...
0
votes
1answer
55 views

lines: distance-direction computation queries

From the distance and direction tutorial below: How to add Direction and Distance to attribute table? that uses: 1 - xat (0 ), xat (-1 ) and yat (0 ), yat (-1) for start and end points of lines; ...
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 ...
1
vote
0answers
58 views

How to approximate point to segment distance on sphere?

I would like to approximate the distance of a line segment from a reference point on the map (coordinates are gives as lat/lon). In the Cartesian coordinate system I would simply find the closest ...
2
votes
1answer
74 views

GeoDjango: read geometry column in geography field

I have a Django application that needs to work with an existent PostGIS database, apart from its own database. I've configured multidatabase support, created a database router, created models for the ...
5
votes
1answer
210 views

calculate {minimal} distance between polygons in R

I have calculated the surface area of species distributions (merging polygons from shapefiles), but since this area can be comprised of quite distanced polygons, I would like to calculate some measure ...
0
votes
1answer
26 views

Determine when a route enters and leaves a polygon

I have all of the segments of a route from White Horse, YK to Miami, FL. Now I want to determine how many miles I travel in each State / Province. I have Polygons for each State and have been able ...
2
votes
1answer
50 views

using PostGIS to calculate distance of a route over a large area

I'm new to PostGIS and looking to measure the distance of the Pacific Crest Trail which spans western North America from Canada to Mexico. I have a data set containing the lat lon and dates from GPX ...
4
votes
2answers
476 views

What formula is used for distance between 2 points in Google Maps?

What formula is used by Google Maps for calculating the shortest distance between 2 points (having their Lat, Lng coordinates)? Is it purely based on Haversine? Or is it something different? Is there ...
3
votes
1answer
443 views

How to create points at shortest euclidean distance to other points?

So, I have a lot of points, and I need to site three new points so they will be at the shortest euclidean distance between all of the other points. In other words, these three new points that I need ...
0
votes
3answers
183 views

Computing distance of a georeferenced .jpg to each polygon (town) in a shapefile

I have a .jpg that is a highway that spans multiple towns, and a shapefile with boundaries of these towns. I have georeferenced the .jpg so that it is aligned with the shapefile of the towns. My ...
0
votes
0answers
22 views

QGIS - identifying polygons and distances along the edges of a superset

I have two layers of polygons. layer A is a superset of dissolved polygons from my other layer, B. Using QGIS, how can I determine polygons in B, that lie along the edges of A? There would be some ...
2
votes
1answer
159 views

ArcGIS giving measured distances and the scalebar incorrectly

I am currently using ArcGIS 10.1 and am struggling to be able to measure distance or set a scale bar correctly. Its currently giving me absurd results orders of magnitudes to small (0.5m etc). All my ...
1
vote
1answer
163 views

Creating Random Points in ArcGIS 10.1

I would like to create random points across my study area (which is a DEM raster) using the Feature Class> Create Random Points. However, I need to select/copy/move/delete these points and re-arrange ...
0
votes
0answers
67 views

Calculating distances between boundaries of polygons with Python

I have two sets of shape-files which have to be worked on within a Python Script. Those two Shape Files might differ from each other (same thematic content, but 2 different epochs). If there occurred ...
1
vote
2answers
232 views

Calculate distance in kilometers between two points

I have a few questions regarding the calculation of the distance between 2 postal codes. Take a look at the following code. ### # load the different packages we need ### require("rgdal") ...
4
votes
1answer
92 views

Proximity search: ST_DWithin vs ST_Distance?

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 ...
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 ...
5
votes
1answer
135 views

Optimize the locations of 2 additional restrooms on a trail (ArcGIS 10.2)

In the image below, the line is a trail and the point is an existing restroom. I would like to find the rough locations of 2 additional restrooms that minimize the maximum distance along trail from ...
-1
votes
1answer
77 views

Calculation of Euclidean Distance [closed]

What is the best way to calculate the euclidean distance between the elements of two point vector layers, without rasterising the layers? Thanks
2
votes
2answers
153 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 ...
0
votes
1answer
61 views

mile distance around each feature ArcGIS

I have a school layer information and a route map layer. In ArcMap, how can I show the x mile distance around each school base on route information. I did some research and I found different ...
0
votes
1answer
79 views

calculate least cost pathways for a region and create distance rasters to rivers [duplicate]

How do you calculate all the least cost pathways that exists for a region? I would like the output map to display all routes (and was wondering whether this can be done in one set of operations). I ...
3
votes
1answer
22 views

Equidistant projection for northern Delaware

I'm just getting started on a long-term project involving northern Delaware. Most of my distances will use great circle distances from the lat/lon, but for a few applications I'll wind up using ...
0
votes
1answer
115 views

Manipulating distances in python. Problem with ShapeLength

I have a question more than a problem. I'm getting the distance of a line using python with arcpy.da.SearchCursor or FeatureClassToNumPyArray. The result I get is a double. Example: ...
0
votes
1answer
107 views

How to find features within a distance? [duplicate]

I insert the values from lat/long into the points. Those users move around and send me new Lat/long and of course , I made an update of the position. I need to find people that are in a distance ...
2
votes
0answers
50 views

coordinate system for calculating distance at the nation scale

I want to use ArcGIS 10.1 to calculate the straight (euclidean) distances from zip codes to their nearest city centers in about 300 U.S. metropolitan areas. I have two point shpfiles: one includes the ...
2
votes
1answer
85 views

How to find least-cost paths including tunnels (where slopes are too steep)?

I'm currently working on a road path finding project for a motorway in ArcGIS 10. One criterion is obviously the slope angle. What I would like to do is to create a new cost surface which finds ...
2
votes
1answer
164 views

PostGIS: Calculate the length of just the portion of linestring that intersect with a polygon

I want to calculate the portion of the linestring that lies within the limits of a polygon. Better with an image What is the length of the portion of linestring within Province A? and within ...
2
votes
2answers
185 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 ...
3
votes
2answers
106 views

Calculate distance in QGIS, wrong geographic projection?

I'm trying to do the following: I have 2 shapefiles, one containing all the public schools in NY, another one containing the hotspots in NY (both in points form). Now what I'm trying to do is ...
0
votes
2answers
300 views

Find longitude for point between two coordinates with pyproj?

I've written a function to get the longitude of a point of known latitude between two known points (might not be working correctly yet), but I feel like there must be a better way of using pyproj to ...
2
votes
1answer
48 views

Road Miles Calculation without Google Maps

We have two ZIP codes we want to calculate the road mile difference. Google maps states you cannot use their API if you do not show a map. Is there another service that provides this type of ...
4
votes
2answers
191 views

How to calculate the azimuth of a line of a multilinestring in PostGIS?

I have two spatially enabled tables in PostgreSQL with a geometry in each: First table is with POINT type, second is with MULTILINESTRING. I need to calculate the azimuth of the LINESTRING part of a ...
4
votes
1answer
145 views

How to find Closest Facility (euclidean distance)?

I have some facilities and incidents, and I want to find the closest facility for each incident. I've done it via Network Analyst (with a network dataset) but I'm wondering if you can do it with just ...
6
votes
4answers
445 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. ...
7
votes
2answers
444 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 ...
4
votes
2answers
963 views

Spatial distance analysis in QGIS

I'm quite new to QGIS and trying to figure out how to analyze the following problem. I have three layers: settlements point layer with 253 entries waste treatment facilities point layer with 24 ...
0
votes
3answers
221 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: ...
0
votes
2answers
354 views

How to determine average distance from points to line?

I have a polyline road dataset and a study area (polygon) covering the the road dataset. I want to determine the average distance for every given point within the study area to the nearest road. i ...
0
votes
1answer
41 views

QGIS proximity raster with extent beyond original coverage?

I need a raster coverage of distances from points outside the geographic region of interest, and am having trouble doing this with QGIS. Questions like this one (Calculating distance to points in ...
3
votes
3answers
370 views

How can I calculate the distances between my points in sequence automatically?

I have a rookie problem (again). I am trying to measure distances between points and writing the calculated measure between these points in the attribute table. The points represents a vehicle's ...
0
votes
1answer
37 views

Can distance be calculated to a destination feature based on an attribute in the source?

All, Is it possible to specify which destination point to calculate distance to based on an attribute in the source? STDistance will give me the distance each student (point) is to their closest ...
0
votes
1answer
62 views

Point to point distance over specified distance

I need to calculate the distance between neighbouring points which conform to a staggered line. I have two point datasets, one being the baseline and another the monitor. The points typically reside ...
3
votes
0answers
129 views

converting a distance to a map distance

I have a point and a polyline. I need to find the perpendicular distance between each segment of the polyline and the point. By each segemnt of the polyline I mean that, each polyline may contain more ...
1
vote
3answers
516 views

Generate random location within specified distance of a given point

In a simulation (not using any GIS), I need to generate a random location that is within a specified distance of a given location. I found a very helpful post here on this exact topic: How to ...
3
votes
1answer
645 views

Measuring distance between points along a river system

I have a forked river with multiple x,y data points along it and I need to measure the distance between these points when travelling along the river. However the forked part is throwing a wrench into ...
-1
votes
1answer
463 views

SQL to get points within a certain distance

I am new to using spatial data types in sql server. I have managed to create a column of Approx 50,0000 geometry points (from x,y data) and would like to find out which (count number of) points are ...
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 ...
2
votes
3answers
695 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 ...