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
6 votes
2 answers
3k views

Getting the departure time based on a desired arrival time for driving

Context: I'm working on a logical problem as part of my Msc. thesis in GIS. I want to calculate the departure time (output) based on a desired arrival time (input). I have chosen to use an API to ...
0 votes
1 answer
950 views

Creating multi-ring buffers around points in a single layer and for each point selecting neighbors within a specified radius in R

I have a CSV file of data on a set of 3000 points (locations) with respective coordinates and a number of attributes. I want to perform a regression analysis that takes cognizance of any spatial ...
0 votes
1 answer
275 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 ...
7 votes
3 answers
3k views

distance matrix with a linear feature

I would like to use the distance matrix tool (or a similar function) to look at distances between sites (displayed as point data) and large rivers (displayed as linear). I have been following this ...
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 ...
0 votes
0 answers
31 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 ...
0 votes
1 answer
60 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 ...
5 votes
1 answer
92 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)') &...
7 votes
2 answers
2k views

Calculating shortest distance between points within polygon using QGIS?

I performed a transect in which I sampled several animals. The location of these animals are represented by a point shapefile. I am interested in calculating a pairwise matrix of distance (in meters) ...
0 votes
1 answer
123 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 ...
2 votes
1 answer
695 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 ...
1 vote
1 answer
6k views

QGIS distance matrix in meter instead of decimal degrees

I created a point layers of store locations and customers in Florida by given coordinates (WGS 84 EPSG: 4326). Now I need a distance matrix between stores and customers, but the result is in decimal ...
1 vote
1 answer
2k views

PostGIS - Calculate of the average distance between points for a delimited area

I am working with PostGreSQL I have 2 data sets: 1) A points layer where each point represents a building. 2) A Polygons layer created from the points layer using convexhull and clusterwithin ...
0 votes
2 answers
491 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 ...
0 votes
0 answers
59 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 ...
0 votes
1 answer
63 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 ...
2 votes
0 answers
46 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 ...
10 votes
1 answer
706 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 ...
5 votes
1 answer
1k views

Distance Matrix of Shortest Paths from all m points to all n points through a network [closed]

This question was asked many times and I could reference endless GIS-SE links here. Most of them suggest using pgRouting, which is not an option here. I have to use QGIS (for other technical questions)...
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 ...
5 votes
3 answers
2k views

What is the proper way to calculate distance in km from degrees

For a genetic analysis of Australian humpback dolphins I am currently trying to assess whether or not genetic differentiation correlates with geographic distance in water. For this I have done the ...
1 vote
2 answers
2k views

Calculate distance matrix in km units

I would like to create a distance matrix and have as output the distances expressed as kilometers (km). Here my current output, which I believe is in degrees and NOT in km: My coordinate system (CRS)...
1 vote
1 answer
297 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 ...
1 vote
2 answers
86 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 ...
1 vote
1 answer
143 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 ...
1 vote
0 answers
159 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 ...
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 ...
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.
0 votes
1 answer
128 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 ...
2 votes
1 answer
420 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 ...
1 vote
0 answers
83 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 ...
4 votes
3 answers
7k views

QGIS: calculate distance between points

I'm using QGIS 2.8. I need to calculate the distance between points depending on points ID (not nearest point). I have a CSV table including points ID and coordinates. Each point is referenced on 2 ...
0 votes
0 answers
220 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 ...
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, ...
2 votes
1 answer
125 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 ...
3 votes
2 answers
151 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 ...
0 votes
1 answer
123 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 ...
6 votes
3 answers
889 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 ...
5 votes
3 answers
224 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 ...
2 votes
0 answers
104 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 ...
1 vote
1 answer
360 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 ...
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 ...
3 votes
0 answers
155 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 ...
1 vote
1 answer
474 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 ...
4 votes
1 answer
774 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 ...
2 votes
1 answer
310 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: ...
3 votes
2 answers
125 views

Measuring distance between certain relations in QGIS

I need to measure the direct distance between busstops in meters, not taking roads/networks into account. I have the WGS 84 Coordinates + globalIDs for 28.000 pairs. I already imported the Busstops ...
2 votes
2 answers
2k views

Spatial weight matrix QGIS - export to stata

I'm looking to estimate a spatial panel model in STATA, however, I'm running into difficulties creating a spatial weight matrix. For note my N=66 while my T=25. I'm a novice when it comes to ...
0 votes
1 answer
678 views

Distance matrix expressed in meters

I'm aware that this is the hundredth (possibly more) time someone asked about the distance matrix that is expressed in degrees, but should be in meters. I read most of the questions, online guides, ...
2 votes
1 answer
297 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 ...