Questions tagged [distance]
The measure of separation between two entities or locations that may or may not be connected, such as two points.
1,581
questions
0
votes
0
answers
29
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://...
0
votes
1
answer
29
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 ...
0
votes
1
answer
32
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
1
answer
70
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 ...
0
votes
0
answers
31
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 ...
0
votes
0
answers
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 ...
1
vote
1
answer
94
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
0
answers
110
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, ...
0
votes
1
answer
35
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 ...
4
votes
2
answers
76
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 ...
1
vote
1
answer
37
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 ...
2
votes
1
answer
71
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 ...
2
votes
1
answer
58
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, ...
3
votes
0
answers
83
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:
...
0
votes
0
answers
12
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
0
answers
68
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 ...
1
vote
0
answers
48
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.
1
vote
1
answer
49
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 ...
1
vote
0
answers
141
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
2
answers
64
views
ST_Distance from one location to several locations on the same table
I have a table that contains different city buildings called "gebaeude_salzburg".
I want to calculate the distance of all the buildings of the type='school' and 'kindergarten' to the central ...
0
votes
0
answers
37
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 ...
3
votes
1
answer
167
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 ...
2
votes
1
answer
78
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 ...
0
votes
0
answers
47
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 ...
0
votes
0
answers
42
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 ...
3
votes
2
answers
133
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 ...
4
votes
1
answer
164
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 ...
0
votes
1
answer
38
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 ...
6
votes
3
answers
421
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 ...
0
votes
1
answer
30
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 ...
0
votes
1
answer
163
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 ...
3
votes
2
answers
286
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 ...
0
votes
0
answers
17
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 ...
0
votes
0
answers
14
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 ...
2
votes
2
answers
82
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 ...
1
vote
1
answer
56
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 ...
0
votes
0
answers
54
views
Calculating average of nearest neighbour distance between points in grid
As a novice ArcMap user, I would like to calculate the average of the shortest distances between each point contained in a vector grid.
My inputs are two vector layers : a polygon grid and points.
The ...
0
votes
0
answers
45
views
Accumulated distance between points
I have this piece of code that I can make lines between points and calculate the length of the line, but now I need to calculate the accumulated distance only between the X axis, I managed to use ...
2
votes
1
answer
90
views
Calculate road distance between two points in PostGIS - Resultant distance is not accurate (not even close to the actual distance) [closed]
SELECT
torigin1.id AS origin_id,
tdest1.id AS destination_id,
CASE
WHEN ST_LineLocatePoint(troad.line_string, torigin1.geom) < ST_LineLocatePoint(troad.line_string, tdest1.geom)
THEN ...
-1
votes
0
answers
75
views
QGIS raster proximity / distance results too small
Following advice at Raster analysis , Proximity (raster distance) & Units raster proximity, I reprojected my geographic-coords raster to projected (NAD83/UTM zone 17, EPSG:26917), set the project'...
3
votes
1
answer
73
views
Plotting transect line with equally spaced points and get the coordinates in QGIS
In QGIS I am trying to plot a transect line. For this I would like to place points every 500m along a line and get the coordinates of each point, but have not managed to achieve this unfortunately.
Is ...
0
votes
2
answers
35
views
Creating buffer region using ArcMap
I'm trying to exclude a distance of 2km from several built-up area/settlements as an exclusion area.
A little background, I extracted the built-up area from a land use cover map and converted it to ...
1
vote
0
answers
50
views
Unable to get the road network distance between two points in PostGIS
SELECT
sf.id,
sf2.gid,
SUM(ST_Distance(
sfroads.geom,
ST_LineInterpolatePoint(sfroads.geom_latest1,
ST_LineLocatePoint(sfroads.geom_latest1, sf....
0
votes
0
answers
36
views
QGIS Distance to nearest hub wrong point selection for distance calulation
I'm using the graphical modeler in QGIS 3.28.8 to automatically calculate distances of two lines between points, see the picture.
To do this, I'm using Distance to nearest hub (line to hub) and an ...
1
vote
1
answer
61
views
How to Calculate Summary Statistics For Distance Bands in R [closed]
I currently have a shapefile with tourism data by district for the country of Jamaica, but I would like to try and also obtain for each district the average amount of tourism activity in districts ...
1
vote
1
answer
56
views
Number formatting in Elevation Profile in Print Composer for QGIS
I have created the following Elevation Profile in QGIS based on a DEM featuring its distance in metres.
As you can see, the distance axis displays the values in metres, which, for the sake of the ...
1
vote
2
answers
622
views
Attribute nearest raster values to points, only for points within X distance of raster
We have points data which represent places we tied a gillnet (imagine a tennis net underwater) to mangrove roots along the shoreline and subsequently caught (and released) sawfish, a type of shark. ...
1
vote
0
answers
33
views
QGIS: Distance to nearest polygon in another filtered layer
I have two layers, one that collects data and is made up of some hundreds polygons and another that has polygons for cities/towns/villages and includes the number of inhabitants. In the data ...
1
vote
1
answer
47
views
Distance between point layers in QGIS
I have data points where respondents have indicated where they were on vacation (variable pointsSH). In the attribute table of these data points is stored where the people live (the zip code). I also ...
0
votes
0
answers
25
views
Setting distance range in spatial join using ArcMap
I have many city polygons and I want to select some of them with distance range condition from boundary of other polygons. I use WITHIN_A_DISTANCE in spatial join but this item selects even ...