# Questions tagged [distance]

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

1,293 questions
Filter by
Sorted by
Tagged with
115 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) ...
20 views

### Calculate shortest car distance — repeated over many points

I am using QGIS 3.10. I have a dataset with coordinates of many households. Separately I have coordinates of a number of sites. For each of these households, I need to calculate: Which is their ...
43 views

### NNJoin in QGIS does not return any distance

I have two layers, one with ~100,000 points, and another with ~20 polygons. I'm trying to find: a. which polygon a point belongs to b. the distance from the point to that polygon I understand that ...
23k views

### Measuring distance between points using QGIS

I have a layer with about 500 single points. Now I want to measure the distance between each of these points and one specified observation point. I need the distance to show how far away from the ...
31k views

### Adding Direction and Distance into Attribute table

I just want to add direction (Bearing: i.e N 25 35 E) and Distance (Length: 125 meters) as my new field in polyline/line data. Is there a Plugin to generate these fields? I tried to used "Export/...
92 views

### Calculating Euclidean distance in ArcGIS

I am willing to model the distribution of an amphibian species in relation to climate and land cover in MaxEnt. For this I have downloaded the WorldClim data and the Global Consensus Land Cover (https:...
32 views

### Is there a quick way to calculate the change in an attribute over distance?

I am working in QGIS 3.14.0 and have a set of point data input via latitude and longitude in a CSV file; this file also includes data taken at these points. I would like to visualize the change in ...
131 views

### Measure shortest distance between all points in a layer and a polygon's border line

How do I measure the distance between all points in a vector layer and a polygon (not to the polygon centroid, but to it's border line)? In the image points are fires and the polygon is a National ...
31 views

### How to get most accurate Point-Point distance queries in Europe with Spatialite

I have a GeoDjango app, currently on PostGIS, which I am converting to use Spatialite db instead. I have no specialised knowledge about GIS systems :( The locations table has a Geography column ...
69 views

### Why are the 500 meters not 500 meters? And how do I add 500 meters in x/y direction to a lat/lon point?

I wanted to create a square cell on a map with size 500m times 500m. Therefore, I wrote the following code: from pyproj import Transformer bl_lat, bl_lon = 40.64423086189233, -74.0307935018417 ...
49 views

### Is there an Excel, Stata, MATLAB, R or Python program or online website that converts geo-coordinates to distance at large scale? [closed]

I have the geo-coordinates (latitude and longitude) for more than 1000 counties (in Excel) in the US, and I want to know their distances to a particular county with known geo-coordinate. Is there an ...
651 views

### Calculating minimum distance in meters of two polygons (defined in lat/long)

I need to calculate the minimum distance (in meters) of two polygons which are defined in lat/long coordinates (EPSG:4326) using Python. shapely geometries have distance() method which almost does ...
49 views

### ST_HausdorffDistance() mismatch

I have been using PostGIS 3.0. The ST_HausdorffDistance() function calculates a symmetric distance between two polygons. However, Hausdorff distance is not a metric since it is the maximum distance ...
52 views

### Appropriate CRS for Close Distances in USA

I have a very big dataset in the form of longitude-latitude points in the US; with points from the entirety of contiguous US. I need to calculate the distances between points and check if they are ...
52 views

### Measure length (in pixels) between multiple points on an image?

I have a fairly high resolution map (jpg, not vector), with a known scale. How to measure the length in pixels between multiple points on an image? For a straight line it is simple, but how to do it ...
203 views

### Calculating length of polyline defined by list of coordinates using Python

I have a list of coordinates, knowing that I am working using EPSG:4326 and using Python I would like to calculate the length in kilometres of the polyline defined by these coordinates. Coords = [(0.0,...
67 views

### Apply symbology based on an algorithm (ArcGIS)

Been battling this problem for a long time now, so hoping someone here can shed light on a possible solution. The problem is that I have 100 points and I want to apply a color palette to the points so ...
63 views

### Calculating furthest distance from a pipeline line segment to a road line segment in QGIS

I am currently using the v.distance GRASS tool to calculate distances, but it naturally gives the nearest (shortest) distances. Oddly enough, I would like to find the furthest distance from a ...
581 views

### Python: Open a (line) shapefile and calculate distance to point given as a longitude-latitude tuple

I have a Pandas dataframe in Python with longitude and latitude values of certain locations (see sample below): Index Long Lat 0 -98.58 ...
2k views

### Calculating distance from polygon to point

t1 = Polygon([(4.338074,50.848677), (4.344961,50.833264), (4.366227,50.840809), (4.367945,50.852455), (4.346693,50.858306)]) t = geopandas.GeoSeries(t1) t.crs = {'init':'espg:4326'} t2 = geopandas....
59 views

### QGIS 3x calculate distance between two points with coordinates

I have a problem, very similar to Calculating distance between two points with coordinates using ArcGIS Desktop where I would like to calculate the distance between two polygons (circles) with their ...
40 views

### Splitting lines at multiple points in ArcGIS

I have two shapefiles: First shapefile consists of lines features (approx 1500); it represents the public transport lines Second shapefile consists of point features (approx 3000); it represents the ...
1k views

### Calculating distance travelled along track in QGIS?

I'm new to GIS. I have some tracks of people walking from point A to point B that I took using breadcrumbing with Garmin e-trex (set on the Auto track settings). I've loaded the tracks into QGIS and ...
43 views

### Polygon buffer by distance

I am working with a world map shape file in the Spherical Equidistant Projection (Equirectangular) in QGIS 3.4. When creating a buffer using the VectorGeometry>Buffer function set for distance in ...
71 views

### Faster st_is_within_distance for points to lines

I am looking for a fast way to run a st_is_within_distance (or equivalent) in R, to find all the lines (y) within a given distance of each point (x). (This would be an equivalent of ArcGIS's "...
42 views

### When to use spatial regression for the proximity analysis

I am not sure about whether I should use spatial regression for the proximity analysis I am trying to do. I’ll just describe the scenario and goal: People claim that convenience stores lower nearby ...
28 views

### Does Euclidean distance consider multiple points nearby?

I have a hypothetical setting I am trying to use to better understand Euclidean distance. So of course this example will only work for the purpose of understanding a concept, rather than actually ...
39 views

### QGIS 3x automeasure distance for all lines in the layer

I have got 2 lines in my layer. I would like to measure their distance automatically. I found the tool, which might be helpful. This is the v.distance algorithm in GRASS, as advised in the link below: ...
865 views

### Calculating distance for each point along line in ArcGIS Desktop? [duplicate]

I have a polyline(Roads network) and points(Nodes) recorded along the line. I would like to calculate the distance for each point along the line in ArcGIS 10.1. Result will added in a new column and ...
23 views

### Add the distance along the route for intersection points of polylines

I have two sets of polylines, illustrated in the screenshot (roads in purple and bridges in blue). I want to find the distance along the route for intersection point of each bridges from the starting ...
112 views

### Haversine based distance transform

I have a binary image with pixel resolution in units of degrees (EPSG:4326): In this case, all the light-blue pixels are water (value = 1) and purple pixels are not water (value = 0). I would like to ...
76 views

### Find distance between two points by following a polyline in R

I have a polyline shapefile that follows the center of a stream, and I have coordinates for animal positions within the stream (not necessarily immediately on the line), and I am trying to calculate ...
105 views

### MapWinGIS Create Buffer Using Data That Has WGS84 Coordinate System

I am using MapWinGIS with c#. I am trying to create a buffer for a polygon that has WGS84 decimal degree reference system, but it never get displayed. Here is my code: // Form load var gp = new ...
105 views

### ST_DWithin exponentially slow. Cannot find what I am doing wrong

PostGIS version: 3.1 PostgreSQL version: 12.3 The machine I am working with has: 126G RAM, 48 CPU cores Info: I am getting started with PostGIS. My goal is to get all the matching data between two ...
14 views

### How calculate distance of two points (between my location and previously my location) in JavaScript?

I am using JavaScript and geolocalisation but I want to calculate the distance between my previous location and new location. How can I do this?
29 views

### Distance from one city to others by a mutual ID

I don't understand spatial.data at all. I have been studying but I'm missing something. What I have: data.frame enterprises with the columns: id, parent_subsidiary, city_cod. What I need: the mean and ...
73 views

### Distance between two points within a polygon (or raster value) in R

I'm trying to get the shortest distance between each point in a a set of coordinates (lat/long) within a body of water. However, straight line distances don't work because the points represent the ...
125k views

### Find features within given coordinates and 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 users who are inside the circle or square of a given latitude and longitude with given distance. ...
44 views

### Getting maximum distance for point features in the same point group

For each group I want to find the maximum point-to-point distance (and which of the id1 features participate in the max). For example, if I have the following attribute table: FID Long Lat id1 ...
138 views

### QGIS - From a point along a line (centreline), find the longest line to the centreline, without crossing a polygon boundary

https://onedrive.live.com/embed?cid=AEC7953479B58DC0&resid=AEC7953479B58DC0%218329&authkey=AKHlm_SovPNQOYw I have a series of points (ObservationPoints.shp) along a line (Centreline.shp). I am ...
85 views

### Find the nearest point on polygon (coastline)

In python I have a shapely polygon (which defines the coastline of the UK), given a point within the UK I would like to find the closest point on the polygon (coastline) to that point. I have been ...
68 views

### Calculate the distance between two points on a sphere (earth) going through the earth?

I can see the formula and name of the term for the distance between any two points on a sphere when going around the surface of the sphere is the great-circle distance, or orthodromic distance. What ...
2k views

### Calculated distance doesn't match Google Earth

I have a google earth route that measures 190.1km in Google Earth. I then pulled down the .kml file, extracted the points and measured them using Vincenty's formula (ellipsoid earth) and got 190.2. ...
12 views

### Distance from a point to the two neightbouring points (both directions) in on a polyline of a pipe system

I need to find the distance of a valve to the two neightbouring corners in a piping system. I have the following shp files: -Nodes for the valves -Nodes for the corners -line layer file of the piping ...
60 views

### Techniques for point-level speed calculation from GPS traces

I am working with a GPS dataset where GPS speed is not available, only the lat/lon coordinates and timestamp. Currently, I calculate point-level speed from rate of distance between two consecutive ...
69 views

### How to calculate the distance of points to line in R?

I need the distance from each point of the object found to the transect line. 'id' is a research transect, and 'obj.id' is the object found. in this case, 1 object was found in transect A and 2 ...
77 views

### Distance to coastline in meters using Cartopy and Shapely

I am trying to calculate the distance to coastline for some points. Using Cartopy and Shapely, I can calculate the distance in degrees, but that is not very helpful. Perhaps if I could transform the ...
28 views

### Plotting bearing and distance from known point in ArcMap

I have bearing and distance estimates of animals from a survey post. I have the coordinates of the survey post and I already have that in GIS. How do I plot these bearing and distance estimates as ...