Skip to main content

Questions tagged [distance-matrix]

a distance matrix is a matrix (two-dimensional array) containing the distances, taken pairwise, of a set of points.

Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

Finding shortest road distance between points on two datasets QGIS [duplicate]

I have two point datasets: Communities and Vet clinics I am trying to find the nearest distance between each community and the closest vet clinic, but would ideally like to link this to a roads ...
user111060's user avatar
0 votes
0 answers
26 views

Use TomTom Data as Network Dataset to Calculate OD Cost Matrix Distance and Time

I am stuck in with configuring a network dataset using TomTom data. I used to rely on the Routing_ND network dataset provided by ESRI Business Analyst to perform OD Cost Matrix analysis. Now I am ...
Gengkui Liu's user avatar
0 votes
1 answer
38 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 ...
Sn0W's user avatar
  • 155
5 votes
1 answer
85 views

PostGIS min and max distance between bounding boxes

I've been exploring the capabilities of PostGIS get the minimum and maximum distances between bounding boxes. --returns distance between centroids select ST_GeomFromText('LINESTRING Z(0 0 0, 1 1 1)') &...
Максим's user avatar
0 votes
1 answer
117 views

Calculating large travel distance matrix

I need to calculate a really large travel distance matrix 3600^2 to solve a TSP problem between points. I have the coordinates of the points and also the addresses. How can I calculate this matrix ...
ELYASHIV MAYZLISH's user avatar
0 votes
2 answers
431 views

st_distance() hangs with large number of points in R

I am using sf::st_distance() to calculate a distance matrix in R. I have around 30,000 polygons, and I am running this analysis on a computing cluster with ~500G of RAM. I understand that 30,000 ...
geoscience123's user avatar
0 votes
1 answer
250 views

Faster way to compute Moran’s Index from a very large distance matrix between geographic points

I am computing Moran’s Index from a very large distance matrix between geographic points. The time to execute the code is too high. I used the dism function in the geosphere package. Here a ...
Pierre's user avatar
  • 395
0 votes
0 answers
57 views

Calculate distance matrix in km units not degrees

I need to calculate the distance of England crimes to the Uk coast. I have a shapefile of the outline of the coast and extracted the vertices. So then I can input the crimes to the coast in distance ...
Squish Squash's user avatar
0 votes
1 answer
62 views

QGIS Distance Matrix - line geometry output between two input point layers

I am trying to figure out how @AJIKenyon took the expression in this post (QGIS Distance Matrix - with line geometry output?) and used it in Geometry by expression. The layers I have are two projected ...
roger's user avatar
  • 57
2 votes
0 answers
44 views

Calculate network distance from point layer to Hub layer in QGIS

I have a river network layer, a layer of 360 sampling sites and a layer of 700 facilities. I want to calculate the network distance only between sampling sites and facilities but between all sites and ...
Daniel97's user avatar
0 votes
0 answers
36 views

Distance Matrix won't consider elevation

Using QGIS Firenze The Data is present in following Formats: .gpx, .kml .csv. generated by garmin GPS. lat, lon (In Degrees) and elev (in m). There I have 70 Points. I can create a distance matrix or ...
OneMind's user avatar
1 vote
1 answer
269 views

Interpreting total time variable in QNEAT 3 OD Matrix using QGIS

In QGIS 3.26.1, I used the QNEAT3 "OD Matrix from Layers as Table (m:n)" function. (Ancillary info: I am using the TIGER/Line 2019 primary and secondary road data for the US, in order to ...
Benjamin's user avatar
1 vote
2 answers
83 views

Keep only one nearest OD link (QNEAT)

I've made a distance matrix from one point layer (layer A) to another (layer B) using QNEAT plugin (QGIS Network Analysis Toolbox 3). I got a web with links from every point from A to every point from ...
barney stinson 2's user avatar
1 vote
0 answers
150 views

Create grid around lat/lng with same spacing on the diagonal points using SQL Server

As an example I have a lat/lng circled in red below. I want to create a grid of points using SQL Server at 50m intervals up to 200m from the centre point. But those points that are on a diagonal are ...
CGarden's user avatar
  • 165
0 votes
0 answers
30 views

What is the method behind calculating a distance matrix?

Do you know if for the creation centroids or nearest distance (or whatever) is used? How do I know what is happening? Couldn't find anything specific in the documentation.
Emilia's user avatar
  • 9
0 votes
1 answer
124 views

Is there a specific function within Network Analysis - OD Cost Matrix that solves for connectivity issues?

I am calculating the distance between points along a network dataset of roads. However, I am running into issues as some of the points do not align along the road network. I have attached an example ...
BenM's user avatar
  • 3
1 vote
0 answers
76 views

Distance matrix not giving nearest point in QGIS [closed]

I'm having a bit of trouble with my procedures in QGIS Desktop 3.22.6. I bring in a shapefile for the entire US block groups into QGIS. I then bring in points of stores across the U.S. I then use the ...
a_swoosh's user avatar
0 votes
0 answers
212 views

QNEAT3 OD Matrix distance incorrect?

I am currently working on calculating the distances between all pairs of NUTS-2 regions in a road network. To accomplish this I am using the QNEAT3 plugin. It worked very efficiently and I was ...
Jil 's user avatar
  • 51
1 vote
1 answer
63 views

Find closest distance every day in two datasets

My friend and I want to use our exported Google Location data to see how close we've been, at the same time, before becoming friends. In other words: I have two datasets of timestamped coordinates, ...
bouleau's user avatar
  • 19
0 votes
2 answers
5k views

Distance between two points on OSM without routing information

I need to find the distance between multiple points following roads on OSM. I am aware of routing software like OSRM. However, this is not a useful solution for me (at least the alternatives I've ...
Matías Guzmán Naranjo's user avatar
2 votes
1 answer
665 views

Number of points within x min walking distance in QGIS

In QGIS I have a layer of points each one representing a household with its (x, y) coordinates and a population assigned to them. I'd like to calculate the points that are accessible from each point ...
Marc's user avatar
  • 21
3 votes
2 answers
143 views

QGIS - Calculating point-line distances on a bearing from multiple points simultaneously?

I'm working on a wildlife study, and hoping to calculate the distance from each of our trail camera locations to the nearest road in eight points of the compass. I used the Shape Tools Plugin to ...
Malcolm Boothroyd's user avatar
0 votes
1 answer
121 views

Recalculating distance table - is there fast (fast and dirty OK) way?

I have a system that is based on PostGIS that holds a set of coordinates. It serves a lot of user requests where users send their own current coordinates and receive a set of points that are located ...
Drinkins's user avatar
6 votes
3 answers
854 views

Calculating distance between consecutive points in same point layer in QGIS

I have a point layer with close to 60.000 points that depict a river course (pixel extracts from satellite image). CRS of the layer is Geographic (Lat, Long). The pixels are ordered ascendingly from ...
sapho's user avatar
  • 77
5 votes
3 answers
215 views

Measuring minimum distances for closest features between two polygon layers in QGIS

I am trying to find a way to measure minimum distance between two polygon layers in QGIS. I have one polygon layer (orange) which represents hunting areas, and one polygon layer (green) which ...
Erik Berg's user avatar
2 votes
0 answers
102 views

QGIS QNEAT distance matrix - wrong outputs

The data and the problem I started to use QNEAT in QGIS (after very helpful advice from user Babel, here: Average walking distance). But when I was trying to pull some nice maps out of it, I noticed ...
Roman Dostál's user avatar
1 vote
1 answer
344 views

Error when calculating an OD Matrix using QGIS QNEAT?

I was using QNEAT plugin for QGIS just fine after some very thoughtful recommendation on this web. The first time all went well, but I needed to redo it. Now when I try it I get an error. I can use ...
Roman Dostál's user avatar
2 votes
1 answer
124 views

MultiPolygonZ to nearest line using a road network (or: how far is the next highway from a project site?)

I have a MultiPolygonZ layer of Project Sites (ca. 700 features, mostly 1 polygon per feature) and want to get the shortest distance on a road network to the nearest subset of a line layer, e.g. the ...
axre's user avatar
  • 63
3 votes
0 answers
150 views

QGIS OD matrix with option to chose maximum number of destinations and max. distance

Using QNEAT3 plugin in QGIS, you can create OD Matrix from Layers. The ArcGIS documentation about OD cost matrix analysis mentions a TargetDestinationCount as well as a Cutoff_[Impedance] setting to ...
Babel's user avatar
  • 73.1k
4 votes
1 answer
737 views

Aggregating features values based on distance in QGIS

In a polygon dataset, I try to summarize values of surrounding features based on a minimum distance if their area is too small (e.g. 500 square meters). For example, I have 3 polygons with 300, 250 ...
parallax's user avatar
  • 1,482
2 votes
1 answer
298 views

Does Geometry by expression in QGIS except layer without geometry?

There is distance matrix with 9.455 features without geometries in GeoJSON format. It was created outside of QGIS with a tool similar to QGIS's "Distance matrix". The matrix looks like this: ...
Taras's user avatar
  • 33.3k
2 votes
1 answer
377 views

Calculating minimum distance between points in QGIS

I hope to calculate the distance between each property in the Washington DC metropolitan area and the nearest metro station, and I am doing this for each month from 2000 to 2017. I use Distance Matrix ...
AtlCody's user avatar
  • 29
2 votes
1 answer
293 views

Find and delete duplicate rows in matrix in QGIS 3.6

I used the OD Matrix to produce a list of the distances between all sites to all other sites via a network. This process produces duplicates, since it makes calculations in both directions, i.e., from ...
jsilverman's user avatar
2 votes
1 answer
876 views

What unit is represented by OD Matix costs (in QNEAT3 within QGIS 3.6 Noosa)?

Some background to explain what I have done, and thus my current question (at the end). I am trying to find a way to get a list of the distances between sites of a certain class to the nearest site of ...
jsilverman's user avatar
0 votes
2 answers
3k views

Calculating road travel distance between point and polygon layers [closed]

I am trying to calculate the top three shortest distances from a point file (buildings) to a polygon file (designated natural areas) via road networks. I basically need the "Join attribute by ...
keenwild's user avatar
1 vote
1 answer
384 views

How can I calculate the distance between multiple points in a network?

I have multiple points on multiple lines in a network and I need to know the length between these points along the network. I need an OD matrix, like the QNEAT3 distance matrices but for the distance ...
GDP's user avatar
  • 23
1 vote
2 answers
140 views

QGIS distance between centroids from NUTS1 information

I have calculated the centroids from NUTS1 information. Now for every neighbor centroids, I would like to calculate the distance. I want to connect only the neighbor's Centroids regarding the NUTS1. I ...
Giannis Koudouris's user avatar
0 votes
1 answer
530 views

Pairwise shortest distance between points in a road network

1. Problem I have the coordinates for over 5000 points (cities) that lie over a road shape file, as partially illustrated below: I'm working on R, and I need to find the shortest distance between all ...
cassianord's user avatar
1 vote
0 answers
36 views

Modeler - QNEAT3 - selected destinations instead of "all origins" to "all destinations"

I would like to calculate the distance between points from table A (80 000 entities) , to points from table B (500 entities), filtering with a relation parent-infant (or just using a common field ...
cd44's user avatar
  • 301
1 vote
0 answers
95 views

Unusual QGI3S "Exception: Unkowns"

I'm trying to process some OSM data extracted via Osmium. I've managed to process some of my smaller datasets, but as I've begun working on the bigger ones, I'm receiving some odd errors. Specifically,...
StupidQuestionGuy's user avatar
1 vote
1 answer
464 views

OD Matrix algorithm in QNEAT3 plugin (QGIS)

I have two questions regarding OD Matrix algorithms in QNEAT3 plugin. If I set the cost strategy as the fastest path, would the output be the travel time? If yes, is the output in seconds? The ...
Elham's user avatar
  • 419
1 vote
0 answers
104 views

Distance and time fields are null in the output of Matrix From Layer algorithm of ORS Tools plugin in QGIS [closed]

I tried to calculate the travel distance and the travel time using Matrix From Layer algorithm of the ORS Tools plugin in QGIS, but in the attribute table of the output, the duration and distance ...
Elham's user avatar
  • 419
10 votes
1 answer
691 views

How do I interpret the results from the distance matrix?

In this dataset I have created the green dots represent coyote sightings while the yellow dots represent rabbit sightings. I am trying to determine if coyotes and rabbits are randomly distributed or ...
DanG's user avatar
  • 617
11 votes
2 answers
2k views

Why is SQL Server 2019's STDistance Very Slightly Different Than The Vincenty Formula? (Same Up To ~0.0001km)

I'm trying to make a C language equivalent to STDistance. Through research, I've narrowed down what STDistance uses, which apparently is the (inverse) Vincenty Formula. The problem is, I've tried ...
MJT's user avatar
  • 113
1 vote
1 answer
139 views

Improving PyQGIS distance matrix efficiency

I have written a custom processing tool, which I use within a large graphical model in QGIS. I am looking for a way to speed it up. First step of this processing tool is to connect every point of one ...
MrXsquared's user avatar
  • 34.9k
0 votes
1 answer
121 views

Include ID in an spatial weight matrix R

I have a data frame like this one: dataSp <- read.table( text = ' ID LATITUDE LONGITUDE A -85 134 B 34 2 C 42 3 D 45 ...
Lilia's user avatar
  • 3
2 votes
3 answers
240 views

Terrain aspect similarity

I have a point data set with terrain aspect at the location of the points, measured in degrees. I want to compute the similarity of aspect between the points, e.g. 70° is similar to 90°. This is ...
Mario's user avatar
  • 561
1 vote
0 answers
40 views

Incorrect Routing Times in ArcGIS Desktop 10.7

I'm trying to find an OD Cost Matrix for a sample of zip codes in LA, San Bernardino, and Clark (NV) Counties using TIGER Data found here: https://www2.census.gov/geo/tiger/TIGER2012/ROADS/ (the files ...
Tyflog's user avatar
  • 11
1 vote
1 answer
75 views

Nearest neighbor distance for Arctic area that spans 2-3 UTM zones

Using QGIS3.10, I have tried Distance Matrix and NNJoin (distance results 0 - 10.32 for both, likely in degrees). I have 93 points of 2 types in one shapefile. I have the same distance issue if the ...
Mike's user avatar
  • 13
2 votes
0 answers
518 views

QNEAT3 doesn't work on all networks

I have a point layer and three different network layers and am trying to create OD-Matrices for all the points using the QNEAT3 plugin. It did work out fine on two of the three networks, but the ...
Bianka's user avatar
  • 21