# Questions tagged [distance]

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

185 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
929 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. ...
117 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 ...
383 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 ...
460 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 ...
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 ...
178 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 ...
759 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 ...
313 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 ...
531 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, ...
492 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 ...
90 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 ...
146 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 ...
266 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, ...
63 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 ...
562 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 ...
519 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, ...
44 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 |...
38 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. ...
44 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 ...
63 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 ...
145 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 ...
296 views

### Optimize computation distance of million points to lines in Python

I have found questions here of how to compute the distance of a point to a line (manually, with distance method of some libraries...) but my problem is that I need to compute the distance of 4M points ...
240 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 ...
169 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'...
92 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 ...
254 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 ...
727 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 ...
142 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( ...
458 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 ...
280 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 ...
161 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 ...
191 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 ...
850 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. ...
200 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 ...
399 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 ...
4k views

### Finding and selecting locations in database near 10 km distance from path

In the Google Maps API, I have this Javascript. It is finding and showing user the shorter path between two cities. <!--////// \\\\\\\--> <style> #panel { position: ...
870 views

### Calculate Euclidean distance to raster WITHIN multiple polygons

I am using ArcGIS 10.1 on a Windows x64 system. I am working in a study area where I have 360 000 locations of about 50 territorial animals. I have a shapefile containing 125 sometimes overlapping ...
237 views

### QGIS Problem in calculating the distance of points from line

I need to calculate the distance of villages ( villages as points) from a border. I have a shapefile containing the locations of villages and another one containing the border. On QGIS, I ran the '...
60 views

### How to calculate distance from point to polygon with a time frame?

Using the Near tool, I knew that I can just calculate the distance of each house to the nearest fire. However, I only want to keep fires that happened in the past 7 years for each house. For example, ...
131 views

### Calculate distance in point collection algorithm

I've got collection of points which are sorted by x,y and distance between n and n+1 (array of objects [{x:0,y:0},{x:1,y:1}....] I would like to calculate distance between all points (point 1 distance ...
2k 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 ...
389 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 ...
122 views

### Get distance after path distance allocation

I use ArcGIS 10.1 in Windows XP. I have a two point feature data sets One containing a single point P1 and another containing multiple points Pm. I computed the minimum-distance path from P1 to each ...
3k views

### Calculate cumulative distance between points in a dataset in ArcGIS 9.3 ArcInfo

I am working with several point datasets that I have received, with the points representing xy locations with elevation data for several levees in south Louisiana. I would like to be able to calculate ...