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
1 answer
60 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 ...
user avatar
2 votes
1 answer
38 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 ...
user avatar
  • 21
0 votes
0 answers
15 views

Spatial panel regression estimation in R: "problem too large"

I use the splm and spdep packages in R to estimate a difference-in-difference spatial regression with time and individual fixed effects. My panel consists of X 30m tiles observed for three years. ...
user avatar
3 votes
2 answers
50 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 ...
user avatar
0 votes
1 answer
33 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 ...
user avatar
6 votes
3 answers
199 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 ...
user avatar
  • 77
5 votes
3 answers
110 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 ...
user avatar
2 votes
0 answers
41 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 ...
user avatar
1 vote
1 answer
70 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 ...
user avatar
2 votes
1 answer
53 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 ...
user avatar
  • 53
2 votes
0 answers
23 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 ...
user avatar
  • 40k
4 votes
1 answer
115 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 ...
user avatar
  • 1,444
2 votes
1 answer
63 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: ...
user avatar
  • 22.9k
0 votes
0 answers
55 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 ...
user avatar
0 votes
0 answers
45 views

Calculate minimum distance between two dataframe in R

I have two dataframe point (addres=XLS with coordinate) and polygon (square=shapefile Esri). I need to calculate de minimun distance between this dataframe. My expected result its a new dataframe with ...
user avatar
2 votes
1 answer
155 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 ...
user avatar
1 vote
1 answer
154 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 ...
user avatar
0 votes
2 answers
244 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 ...
user avatar
1 vote
1 answer
138 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 ...
user avatar
  • 23
1 vote
2 answers
90 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 ...
user avatar
0 votes
1 answer
189 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 ...
user avatar
1 vote
0 answers
20 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 ...
user avatar
  • 291
1 vote
0 answers
47 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,...
user avatar
1 vote
1 answer
214 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 ...
user avatar
  • 379
1 vote
0 answers
67 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 ...
user avatar
  • 379
10 votes
1 answer
357 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 ...
user avatar
  • 597
11 votes
2 answers
1k 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 ...
user avatar
1 vote
1 answer
101 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 ...
user avatar
  • 24.6k
0 votes
1 answer
54 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 ...
user avatar
  • 3
2 votes
3 answers
136 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 ...
user avatar
  • 481
1 vote
0 answers
28 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 ...
user avatar
  • 11
1 vote
1 answer
47 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 ...
user avatar
  • 13
2 votes
0 answers
254 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 ...
user avatar
  • 21
3 votes
2 answers
84 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 ...
user avatar
1 vote
1 answer
598 views

Distance to points tool giving errror ('Error in .pointsToMatrix(xy) : A points matrix should have 2 columns') in R

I am using the DistanceToPoints tool to make a raster where cell values contain the distance to the nearest point. r <- raster('./Raster.tif') s <- readOGR('./Shapefile.shp') dfp <- ...
user avatar
2 votes
2 answers
851 views

Calculate distances from points to multiple country borders in QGIS

I have a shapefile containing several thousand GPS locations located in multiple countries and another shapefile with country polygons (or alternatively also one with country border polylines). How ...
user avatar
  • 53
3 votes
1 answer
283 views

Average distance between two different layers

I am a new user of QGIS (version 3.2.3) and I find myself in need to do some calculations. I am trying to find the average distance between two sets of points (i.e. schools and settlements) contained ...
user avatar
  • 31
0 votes
1 answer
549 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 ...
user avatar
5 votes
1 answer
822 views

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

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)...
user avatar
  • 237
5 votes
3 answers
997 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 ...
user avatar
  • 53
0 votes
1 answer
157 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, ...
user avatar
0 votes
0 answers
269 views

Transform XY coordinates from within a custom flat geometry to latitude and longitude

I am looking for a Python based tool/API (PyProj?) that will help me transforming a set of XY points from within a custom flat map to latitude and longitude. I have information about the latitude and ...
user avatar
2 votes
0 answers
36 views

Create a partial distance matrix in QGIS 3.4

I would like to calculate the straight distances between a series of points: in the first layer (rows) there are the locations of the domicile of my respondents; in the second layer (columns) there ...
user avatar
  • 279
1 vote
0 answers
151 views

Nearest neighbours with Python [closed]

I'm learning Python and this has been a bit of a challenge! My DataFrame looks like this below. name geometry 0 Uimastadion POINT (24.93045 60.18882) 1 Hartwall ...
user avatar
0 votes
1 answer
144 views

Units used for distance calculations by distance matrix tool of QGIS [duplicate]

I can't seem to get the measure tool to match up with my distance matrix tool regardless of what measurements I use. There are conflicting answers on other posts about this question. Both of my layers ...
user avatar
2 votes
1 answer
438 views

QGIS Buffer distance vs Distance in Distance Matrix

I created Buffer (with Vector, Geoprocessing Tools) with 500 M distance from a point in the map (let's say Point A). I made another point (Point B) and it is not inside the 500 m Buffer. The Distance ...
user avatar
2 votes
1 answer
76 views

Distance matrix returns points in wrong order QGIS 3.4

I'm using QGIS 3.4 on Windows 10 and scripting in pyqgis. I have a layer representing building centroids that is in a projected CRS. I want to find the azimuth between each building and its nearest ...
user avatar
  • 53
1 vote
0 answers
79 views

Balancing multiple supply and demand locations in QGIS

I am looking for a way to balance supply and demand with respect to distance, between two vector layers in QGIS. I have two vector layers 50x50m grid Supply (The red negative values) Demand (The ...
user avatar
  • 149
2 votes
0 answers
108 views

Error when running distance matrix in QGIS 3.4.10

I just recieved this error when running the distance matrix in QGIS 3.4.10. I have been using this with success but am now receiving this error. I have checked the data and I cannot see anything ...
user avatar
  • 2,728
4 votes
1 answer
995 views

Distance between two points - by ID in QGIS

I have a dataset of 350 or so individuals. Each individual has a start point (2 columns with Lat and Long) and end point (2 columns with Lat and Long). I would like calculate the distance between ...
user avatar
  • 83