# Questions tagged [distance]

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

1,590 questions
Filter by
Sorted by
Tagged with
23 views

### API for determining distance to closest sea/ocean for a given (lat, long)

Essentially I want know for a given (lat, long), what is the distance to the closest sea / ocean. Is there any open / paid API for that? Bonus if there is an API / library in python. I've heard that ...
101 views

### Incorrect distances when measuring on QGIS, leading to buffers and density maps being much larger

I have created a boat traffic map on QGIS 3.36.2. Here, I have a vector layer containing different points connected to show the boat routes in the Andaman and Nicobar Islands in India. To ensure that ...
42 views

### How to find a specific distance upstream from a point

I am trying to find a simple way to map sections of a river which are covered by a Mink trap. So I have a river layer and a points layer for where the traps are placed. I want to select all rivers (...
94 views

### Draw line and calculate distance from each no adjoining side polygons to perpendicular nearest side polygon

From a polygon geometry layer representing building boundaries, I show a screenshot: I would like to calculate, for each building polygon, the distance from each side of the polygon that has no ...
• 2,419
75 views

### Calculating distances between two features (polygons)

I'm a bit stuck on calculating distance between two polygon features (i.e. closest part of the polygon A to closest part of polygon B (not necessarily where the points are as sometimes a line between ...
129 views

### Algorithm for point to polygon distance calculations in shapely

I want to calculate the distance from a point to a polygon. If I run point.distance(polygon) Will it: Search the points that compose the exterior boundary of the polygon, select the closest point ...
81 views

### GeoPandas giving wrong distances between polygons and points

I'm trying to get GeoPandas to give me the distance between suburbs (polygons) and the city centre (a point). However, no matter what coordinate reference system I use for the distance measurement (...
• 123
40 views

### Calculate distances between all point features in one layer and all point features in another layer (NOT only nearest)

I would like to calculate distances between all point features in one layer and all point features in another layer using ArcGIS Pro 3.1.2 tools or ModelBuilder. I'm not looking for distance to the ...
• 155
53 views

### Seeing how far you can travel by road using QGIS [duplicate]

I have 2 layers, one with roads of an area, and other with shops of the area. What I want to do is to produce a map which could show the roads that are 100m within the shops. Note that what I want is ...
28 views

### Creating line that connects points from feature class to single point in another feature class using ArcGIS Pro

I wanted to connect origin and destination points using a line. The data are contained in an Excel spreadsheet which consists of two XY data (Origin & Destination). Here's a screenshot of an ...
31 views

### Distance calculated in EPSG:4326 is different when caluclated in EPSG:3857 [duplicate]

I have to find a circle with a certain radius that touches two points. I have the two points in a lat/lon form (EPGS:4326), and for the calculus I'm converting into Geocentric coordinates (EPGS:3857). ...
43 views

### Calculating number of points in radius for each line of large dataframe in R

I have around 4 million rows of data that have been collected mainly around big cities and touristic places. The problem I have is that I want to be able to compare data in undersampled locations to ...
78 views

### Which method to calculate distance from coordinates

I have a project to know the distance between two points (Long, Lat). The web app uses openlayers (CRS from 4326 to 900913). I have written a jupyter notebook to check the distance in python. https://...
44 views

### shapely.nearest_points wrong result: floating point error?

I am loading a .shp file through GeoPandas that consists of several LineStrings that should be united, but they are not. So I would like to unite them. I am using shapely.nearest_points and creating a ...
36 views

### Set random points within a given distance of a known street network [closed]

I have a street network with a known ditance of 39735 km. Now my goal is to set a point every 200 km on this street network, so that there will be exactly 198 points generated. The distance of 200 km ...
1 vote
158 views

### ArcGIS Pro Accumulate Distance Vs Euclidean Distance

I am using a very simple sample dataset to create a Euclidean distance surface from the source point. I used the Euclidean Distance tool and also the Accumulate Distance tool. To my surprise, these ...
• 121
32 views

### LineString length obtained from shapely differs from actual real distance [duplicate]

I want to obtain the points of a LineString that are at a distance of 25m from the first point and from the last one of said LineString. I was doing some tests to check whether or not Shapely could be ...
• 11
25 views

### Get rid of points that are over 500m from previous time point

I have gps data from animals over time. The collars recorded the location of the animal every 15 minutes, but there are some funky points that are obviously an error as the animal could not have moved ...
• 41
1 vote
109 views

### QGIS - Find point position on line (lengthwise)

I have a line layer with some lines, and a point layer whose points are located on those lines. Now I need to get the position "along" the line where each point is (as in distance from start ...
1 vote
131 views

### Calculating directionalDistanceTransform in Python

I would like to re-create Google Earth Engine's directionalDistanceTransform function in Python, mainly for learning and understanding purposes. There seems to be no equivalent function in Python, ...
57 views

### Measuring Coastline of the USA (NOAA)

I need to find the distance of the US coastline, I know that this is a tricky subject on account of there being several different ways to measure the coastline (and different scales). That said, for ...
95 views

### Calculating accurate distances using various ST_Distance options

I want to get the nearest neighbour information for a point, and I'm getting different results based on different geometry/geography types. Assuming I only care about the most accurate result, which ...
• 695
1 vote
44 views

### How to calculate the distance of multiple points to a line in QGIS

I'd like to do a regression analysis of magnetic susceptibility measurements taken at several sample points to a nearby road. The purpose is to see if proximity to the road correlates with higher ...
88 views

### KNN (<->) order by -- possible to use spatial index with a secondary order by?

From reading here as well as the docs, I know how to use the <-> operator in my order by in order to do KNN search, and this is fast and uses the gist spatial index as expected. However, I have ...
60 views

### Unexpected results using ST_ClosestPoint: order of arguments make no difference on non-intersecting objects

(Note, this is a revision of the original question. I removed distracting information, without changing the original intent of the question) In this query: select ST_AsText(ST_ClosestPoint(line, ...
92 views

### Slow KNN within fixed radius search (PostGIS) - ST_DWITHIN vs KNN

Ask: I want to return all customers matching certain characteristics within a 50 mile radius of the incoming zip code. This query takes just over a second to complete, and that's because of this line: ...
23 views

### Calculating minimum straight line distance in R

I am trying to calculate a minimum straight-line distance from the district headquarters to the nearest national highway network. I have the district headquarters latitude and longitude in a different ...
1 vote
89 views

### Euclidean Distance error in ArcMap 10.8.2

I'm a beginner in GIS. I've trying to form a buffer for: a road layer and 3 others: rivers, villages and protected areas in ArcMap using Euclidean Distance tool, but I'm getting an error when I set ...
• 11
1 vote
50 views

### What is a tenth of a second (WGS 84) in feet? [duplicate]

What is the equivalent of a tenth of a second (WGS 84) in feet? This would be located in northern NM in the US.
• 11
1 vote
52 views

### Finding distance bettween all connected points (intersections) in a network (on a line) without k-nearest

I am quite new to QGIS so I was wondering whether it is possible to find the distance between all points in a network, such that the distance between each one is determined by whether they are ...
390 views

### NNJoin plugin crash

I'm trying to run NNjoin plugin to compute nearest distance between my plot and buildings (urban) but I'm having this error : Here are my files (maybe not projected yet but it should be in ESPG 23839) ...
1 vote
96 views

### ST_Distance from one location to others

I have a table that contains different city buildings and want to calculate the distance of all the buildings of a type to another with a specific id using the ST_DISTANCE() function
• 83
42 views

### How to calculate a specific distance along a multilinestring from a specific point in QGIS

I have a shapefile of a road network and another one with some points. What I should achieve is calculating a fixed distance (e.g., 10 km) in all directions along the road network, starting from the ...
• 1
187 views

### Get convex hull of polygons if they are within a certain distance of each other otherwise leave their geometries alone

What the question says, I want to join geometries together (as a convex hull) if they are within a certain distance of each other, and leave them as separate geometries if they have no neighbors ...
• 598
85 views

### Multiple operations within Field Calculator using the same IF statement

I have 2 layers (Point_Orien_Vert - red points and Point_Centroides - green points), both are Point Geometry. I need first to check if the distance between one feature in Point_Orien_Vert and one ...
• 33
57 views

### QGIS shortest line between features cannot return 0,0?

I have been out measuring railway tracks. I need to find any deviations from a straight line on the individual rails. I have created a line between the first and last point in my measurement (snapping ...
52 views

### How to select lines within a distance of a certain point?

I am currently dealing with the following issue: I have a dataset with of the roads of a certain place in The Netherlands. Within this place I added two points. I would like to know all the roads ...
151 views

### Calculating sum of Euclidian distances from one point to multiple points within buffer in QGIS

I want to calculate the sum of the inverse distances from one main point to multiple other points within a buffer around the main point in QGIS I have a point file with multiple home addresses (red ...
• 33
326 views

### Extract longest distance between a point and the edge of a polygon for multiple polygons in QGIS

I want to calculate the longest distance between the edge of a polygon and the point that is inside it (or if no point is inside, then the closest point). The polygons are catchments and the ...
55 views

### Why is r.grow.distance in GRASS GIS returning a raster with all values = 0?

I'm trying to create a raster map that contains "Euclidean" distances to roads from another raster that contains said roads, by using r.grow.distance in GRASS GIS. The command executes ...
499 views

### Calculating point density as attribute in point layer in QGIS

For each point in my layer, I would like to calculate the number of other points within x distance, and for that information to be in the attribute table. I have a method but it is a few steps. As it ...
• 163
34 views

### GRASS build polylines based on category/ID (v.net.distance)

I have calculated shortest routes between citywide origin-destination pairs with GRASS and v.net.distance. These routes are segmented, however, and I would like to turn them into polylines based on ...
• 141
216 views

### How to calculate GPS offset given azimuth(bearing) angle and slope distance and inclination angle of the object

If there is an object (tree) which gives back the below data measured from a given GPS location: Azimuth angle Slope distance to the tree or object Inclination angle to the tree or object. How to ...
295 views

### How to draw 8 lines away from every point in a layer using QGIS?

In QGIS I have a layer of many points, and I am trying to draw 8 lines of radius, r, from each point outwards, in the eight windrose directions (N, NE, .. etc). What is one method that can be used to ...
• 109
18 views

### Map location of unknown point coordinates with two known coordinates and distances between them [duplicate]

I have a problem where I need to find the coordinates of a point which is the intersecting point of two circles. I found a similar question on stackoverflow. I understood to some extent, but not able ...
• 1
16 views

### Creating table from distance raster

I have made a distance raster in ArcMap using the Euclidean Distance tool from one town to another that appears to be OK (see attached image). I'm trying to determine the distance from each parcel in ...
• 1
104 views

### Merging polygons based on distance in QGIS

How can I merge not overlapping polygons? I'm trying to set up a model that merges polygons that are within 500m from each other, at the closest edge of the polygon. I have tried with the shortest ...
• 133
1 vote
65 views

### Minimized distance between points while staying INSIDE of a designated polygon

I am a fisheries student and am currently tracking fish movement in a lake. I am trying to assess their optimum/minimized distance moved between each sequential location for each fish. However, I can ...