A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

# Questions tagged [distance]

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

210 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
986 views

### Constructing a Voronoi diagram using a complicated travel time metric

I have in my possession four sets of shapefiles: 1. Locations (points), around 1000 2. Roads (lines), each road has a speed attribute 3. Terrain (polygons), each zone also has a speed attribute 4. ...
154 views

### Position of vehicles relative to lead vehicle

I have a set of vehicles (think railway) that are in a (semi)fixed formation. I know the lead vehicle and I know the GPS coordinates of the lead vehicle at any given time. Sometimes, I can rely on the ...
536 views

### commuteDistance in gdistance package in R giving error

I am currently trying to run a function that "calculates the expected random-walk commute time between nodes in a graph. It is defined as the effective distance (resistance distance) between the ...
395 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 segment of the polyline I mean that, each polyline may contain more ...
116 views

### Cleaning GPS tracks from large jump / outliers

Can someone please explain the steps to take in order to eliminate the parts of these linestrings which jump across large distances (not along with the road network)? They were created from GPS ...
1k views

### Find Distance Between Two Polygons

Given two polygons (point, line, or up to 8 vertices) I need to be able to calculate the shortest distance between them via code I write or a call to an API (I haven't been able to find one that does ...
203 views

### Calculating distances (differences?) between two regions?

I am building a machine learning system which predicts the location of tweets as a bounding box (using the google maps API among other things). Since the twitter API also supplies a bounding box, I am ...
769 views

### calculate total Miles in a polygon using Google Map

I have an application that allows the users to create any custom polygon layer on top of google maps, i am interested to know if their is a way to select the road layer in this polygon and then ...
48 views

### Different distance when using “Measure Line” tool and manually with scale in QGIS 3

Using QGIS's "Measure Line" tool I get a distance of 1.22km between two points. But if I use the scale indicated at the bottom of the screen, 1:50000, and measure with a ruler, the distance is 2.5km (...
34 views

### Find distance between multiple discrete sets of points QGIS3.8

No similar question seems to relate to my issue but I desperately need help with calculating distances. I have a CSV with the residential postcode of 200 000 patients. For each patient, I also have ...
53 views

### Calculating the geographical distance between two points (especially Gnomonic)

I tried to get geographical distance between two points by using spherical trigonometry, Mercator and Gnomonic projection. The detail of 2 points point A ( 15º 55’ S, 5º 44’ W) , B( 32º 19’ N, 64º ...
53 views

### Distance between points

I have 200 locations of species presence. Now, I want to calculate the distance of nearest point for all 200 points. For example, if there is a cluster of points A,B,C,D,E,F,G,H, then what is the ...
64 views

### Distance between points along line

How do I determine the distance between points to the neighbor point that connected via the line(road)? In QGIS 3.8.3 I have tried v.distance and v.net.distance but they do not help. The line(roads) ...
363 views

### How to calculate the distances to outlet along the flow path ?

I have created these raster files for a river basin: DEM Flow Direction Flow Accumulation I like to genereate a layer how it is shown in the picture below. I need the values for the distances from ...
581 views

### Calculating shortest route QGIS

I´m pretty new to QGIS and hence I do not know yet what is possible or not. I want to calculate the shortest distance between several points in a layer. Assuming I have 6 places I want to visit. Mom, ...
571 views

### Near Tool in QGIS

I am looking for an equivalent to the Near- Tool from ArcMap in QGIS. I have a Polygon Layer with potential areas for a new school and need to calculate the distance (in meters) to a point layer (with ...
93 views

### To find distance in QGIS

I'm looking for a solution in QGIS for: the distance measurements from each and every cell site (blue point) back to the Exchange(point) that they are connected with. We need to take the shortest path ...
161 views

### Calculating distance while adjusting for obstacles in ArcGIS Desktop?

I have a global grid of points in the ocean and need to calculate the distance to and identify the closest 10 polygons along the coastline for the entire world while also avoiding crossing land. For ...
282 views

### QGIS distance from point to line along a specific bearing

I've got a vector layer with points (representing customer locations) and another vector layer with a line (representing the coast line). I want to calculate a "smart" distance to coast. Specifically, ...
65 views

### Creating a distance overlay that is computed by the distance of points/lines and recalculated on zooming

I created a fictional map and visualized it with d3. Now I would like to show a scale/rule so that the user can see which distance (kilometers,meters) he is currently using. I was thinking about ...
575 views

### Get Distance between two point on linestring using mysql Spatial

I have a linestring and two point on this linestrin according to my picture i want distance between two point as base of linestring please hellp me
1k views

### FME - calculating distance to points along a line

I am new to FME, and trying to get my head around what should be pretty straightforward issues, but I find myself going around in circles Basically I want to determine the distance (chainage) to a ...
538 views

### GeoDjango order_by('distance') not working as expected?

Using GeoDjango, I am trying to sort a list of users based on the distance from a point. It does generate a list, but its not ordered by distance, though I specify that in my query. This is the query ...
1k views

### Performing Multicriteria Analysis Using Distance Along Road Network?

There is the possibility that I will be working on a project which will look at thousands of properties in a region and measure their accessibility to different services (schools, parks, hospitals, ...
15 views

### Locate features along routes: measurement unit output?

I am using ArcMap version 10.3.1: I have a polyline (also converted to a route feature) and points layer. All points lie on the line. I want to calculate the distance each point is from either the ...
67 views

### Measure distance to coast along river

I have a dataset on rivers and a dataset on the location of dams. I want to calculate the distance from the dams to the river’s mouth at the coast along the river (not the shortest distance) for those ...
44 views

### Calculating line length to both sites in QGIS

Is there a function or a plugin for QGIS that works like this? I have a line, for example, 7 km I click on that line at any point A popup or something gives me the distance to the left an to the ...
24 views

### Shortest Paths Between Adjacent Points on a Network

With the project I'm currently working on I need to calculate how much the total length of the network increases as I expand it from one node to the next. I have the road network as a line layer (...
54 views

### Getting minimum distance of points with scalable algorithm

I have a number of geographical coordinates with latitudes/longitudes: id | name | lat | lon 1 | New York | 40.730610 | 74.0060 2 | Philadelphia | 75.1652 | 39.9526 3 |...
48 views

### Is there a difference in using Haversine distance vs re-projecting coordinate frame?

I have a GeoTIFF raster file in the EPSG 4326 (WGS 84) geographic coordinate system. I want to crop a 20 km x 20 km square around a particular (lat, long) coordinate, and save that as a new raster. ...
52 views

### Traceback Distance Matrix

I am using the QGIS Distance Matrix to calculate the distance of points along a line to that specific line. I used the tool before with 2 points layers and it worked well. This time I created a ...
83 views

### Creating points with linear referencing

I have traffic data that shows tracks that have start and end times (in YYYYMMDD-HHMMSS format) and the speed (m/s) the vehicle was moving. From that I've calculated total traveled distance (m) and ...
311 views

### How do v.distance 'upload' parameters actually work?

I'm trying to use v.distance (using QGIS 3.4) to calculate the distance in meters between a layer of water shutoff points and the boundary of the nearest building footprint polygon. Even better would ...
297 views

### R: discrepencies between pointDistance and costDistance

I'm trying to do some landscape analyses using R, and am having issues where using the pointDistance function from the raster package and the costDistance function from the gDistance package can give ...
170 views

### How to calculate the distance from the point to the raster' boundary in qgis

As the picture 1 shows,I use the points generate the Voronoi diagrams and change the polygons to the raster.The purpose of me is to calculate the min,max and mean distance from points to the raster'...
116 views

### Modifying ArcGIS Network Analyst route when route created is flawed?

I'm analyzing an optimized routes for garbage collection. There are roughly 250 orders per route. I've ran the Network Analyst tool both with time and length impedances. In both cases, the output ...
270 views

### Calculate Great Circle Distance between two point layers via way point

I need to create three distance matrices for around 550 points spread throughout Africa, Europe and Asia. The first matrix represents great circle distances, the second is the shortest distance along ...
1k views

### How to calculate all distance from GPS route using date time and coordinates for php?

I have big GPS data which have 4 columns for id, date time, lat, long. I wanna implement Haversine's formula to get distance between 2 nodes. But if I want to find all distance from start to last ...
804 views

### calculate distance between points in different point layers

I have two point layers. Layer one contains a single point (a landmark) Layer 2 contains a set of points (person locations) Is there an automated means of obtaining the distance of each individual ...
147 views

### OpenLayers measurment path in 31700 projection

I have this code who works great for distance measurment on 900913 projection with 4326 display projection (bing maps + layer WMS): measureDistanceControl = new OpenLayers.Control.Measure( ...
485 views

### How to measure the Speed between two Waypoints?

I'm totally new to QGIS or any GIS. I need to analyze a lot of Waypoints to get the average speed of the people walking between them. (It's for analyzing an experiment I made) therefore I neet do ...
289 views

### How to calculate best path between 2 points from a DEM in Qgis?

I'm analyzing the roads and paths of a region by calculating how effective the communication is in the region. First I calculated the shortest paths between the points using the actual road map. Now ...
163 views

### Why this pyqgis code cause crash dump in QGIS?

In ArcGIS there is gp.EucDirection to calculate Euclidean allocation, distance, and direction around a point, Is there equivalent function in pyqgis or gdal? I wrote a script with help of gene and ...
220 views

### How can I measure the distance between many polygon features and either another polygon or a line in QGIS?

I often have to manually measure the distance between a single site and other sites around it, but obviously this can get long-winded and I feel like there must be a much more efficient way of doing ...
875 views

### Find the point distance along a streams polyline?

Working in ArcGIS. I am looking for a way to find the distance of a point along a streams polyline. I read Finding distance of point along polyline? and it seems to be similar to what I need...the ...
3k views

### How to obtain an euclidean distance raster from a vector file in QGIS?

I'm trying to obtain a raster of Euclidean Distances from a vector layer I have of a river in Spain. I did it very easily with ArcMap using Euclidean Distance, but I don't know how to do it in QGIS. ...
205 views

### QGIS: distance matrix different outputs

In one of my plugins I would like to use the distance geoprocessing algorithm. When running this algorithm from the menu Vector->Analysis Tools->Distance Matrix I get a different output than running ...
410 views

### Calculating distance between points in two tables and including name of second point in infowindow in Carto?

I am plotting community gardens in CartoDB and want to show the nearest subway entrance in the infowindow. I have two tables with the location of the gardens and the subway stations. I am able to get ...