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
3
votes
1answer
113 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 ...
1
vote
0answers
19 views

Shortest Paths Between Adjacent Points on a Network

With the project I'm currently working on I need to calculate how much the total length of the network increases as I expand it from one node to the next. I have the road network as a line layer (...
1
vote
1answer
32 views

Calculating minimum distance between all points of 2 different point layers using QGIS? [closed]

I use QGIS 2.8.3 or 3.4 whatever works better. I need to calculate the mimumum distance between all points of 2 different point layers. I was reading this post https://gis.stackexchange.com/a/62212/...
5
votes
2answers
158 views

No output in PyQGIS standalone script running Distance Matrix?

I am trying to create a standalone PyQGIS script which runs the Distance Matrix in QGIS 3, see below: ######### INITIALISE QGIS STANDALONE ################ import sys from qgis.core import ( ...
4
votes
1answer
101 views

PGrouting number of results in pgr_dijkstraCostMatrix() not right

When running the pgr_dijkstraCostMatrix() on a PostGIS database with 41000 id's I get only 144000 rows in the matrix. I would have expected much more. What am I missing? I parsed the OSM data with ...
0
votes
0answers
14 views

Given a table of distances, how do I distribute distances to minimize them between points of interest?

A little domain specificity first: I work for a nonprofit which runs a high school program for the American Legion. I’m trying to “assign” high schools (338) to local American Legion Posts (126) based ...
2
votes
0answers
38 views

Grouping layers by attribute value and finding nearest neighbour using QGIS?

I am new to QGIS. I have two layers (layer_a and layer_b) consisting of two sets of points. If I want to find the nearest point in layer_b for each point in layer_a, I can just use the Distance ...
4
votes
1answer
155 views

Solving ‘Null geometry…’ error during distance matrix operation?

I have a tab delimited file with data about earthquakes epicenters and their intensities (signif.txt). I also have a shape file with point data representing populated places of the world (...
1
vote
0answers
24 views

Fail to conduct resistanceGA with run_gdistance

I am using a landscape surface resistance distance counting R packages called resistanceGA It can count commuteDistance with the assistance of another package gdistance It uses the following code to ...
1
vote
1answer
59 views

Calculating distance from centroid points to multiple polygon edges with SpatialLite

My question builds on a question previously asked (Calculating all distances from single points to multiple polygons). User @alexandre-neto provided an answer that I've worked on, but it isn't giving ...
0
votes
0answers
9 views

Point-distance analysis using time as an attribute

Is it possible to calculate "points within a certain buffer zone" for each point in a vector layer and do this by controlling time as an attribute field? I would like to analyse morbidity densities of ...
2
votes
1answer
83 views

Travel Distance Calculation in QGIS

What is the best method calculating travel distance between destination and point layer in QGIS when using OSGB 1936 / British National Grid coordinate reference system?
3
votes
1answer
82 views

Fetching the nearest location of points, while accounting for bodies of water

I've got a database of points (in this case, schools) and in my app, users search for the nearest ones to them. Under the hood, we're currently using ElasticSearch to filter by latlng (using Geo ...
1
vote
1answer
138 views

Points Layer to Distance Matrix QGIS 3.6 - Noosa

I'm trying to calculate a sample distance matrix from four points in the BNG CRS: Using Vector-> Analysis Tools -> Distance Matrix, I get: Input point layer is a MultiPoint layer - first convert to ...
1
vote
0answers
112 views

Finding nearest distance between point and polygon layers in QGIS

I am using QGIS to undertake an analysis for a project. This involves a polygon shapefile, which represents a boundary of a site, and a series of points which represents the location of parks. I ...
0
votes
1answer
189 views

dist2Line - Error in dist2Line(…) could not find the function “dist2Line”

I have a csv file with points (about 20 millions georeferenced points) and a line shapefile. I want to find for each point the closest distance to the line. The line is not a straight line it's ...
1
vote
1answer
62 views

Measuring Distances between Points with the same timestamps using QGIS

I'm facing the problem that I want to calculate flight distances of Red Deer. I have a Layer with point Locations of animals; One attribute is the timestamp. I have another layer with point locations ...
2
votes
0answers
110 views

Distance matrix in QGIS shows distance zero to all points

I'm using QGIS version 3.4.2-Madeira. I have a point layer with 96 points in Germany and I want to calculate the 3 nearest neighbors of every point. I know this can be done with the Distance matrix ...
1
vote
0answers
72 views

QGIS: Distance matrix between points, constrained by a polygon

I am looking for a way to calculate a distance matrix between points, but not 'as the crow flies'. I want the distance to be calculated around a polygon layer. Example 1: I have several fishing lodge ...
4
votes
1answer
636 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 ...
2
votes
2answers
87 views

What do you call a map that shows the closest distance to a set of points?

This is one of those hard problems to Google since I don't know the right words to Google! I have a list of 6,000 retail locations in the US, and I want to know, for any given point, how far away one ...
0
votes
0answers
90 views

QGIS Distance Matrix Output is always consists of zeros?

I have a shapefile with 35 points and I try to have the distance matrix showing the distance of each pixel with each other. I choose the input and the target file the same and the unique ID fields are ...
1
vote
2answers
206 views

Excluding point from Nearest neighbor search once it's been matched using R?

I have two lists of addresses, List 1 and List 2. I want to find the nearest neighbors of the list--but without assigning more than one point to any point. So say point 1A is the nearest neighbor of ...
1
vote
1answer
322 views

Distance Matrix with 2 point shapefiles and one street network

I have two point shapefiles (start/destination) and one sort of street network shapefile. I would like a to create a distance matrix from the start-shapefile to the destination points, using the ...
2
votes
1answer
263 views

Distance matrix (nearest neighbour) with polygons

I would like to calculate the closest distance between polygons in the same layer. The "distance matrix" tool only accept point layers. Is there a (easy) way to calculate the distance between edges ...
2
votes
2answers
348 views

QGIS Distance Matrix - with line geometry output?

I have a series of Output Area centroids and I want to create a matrix of lines between each point (every point connected to every point), which is effectively what the distance matrix tool does (I ...
2
votes
0answers
189 views

Find the nearest neighbour for points in one layer to points in another, then measure the distance

USING QGIS 2.18.19 with python console (planning to upgrade to the newest QGIS after this piece of programming) I am struggling with finding the correct pyQGIS coding for this. I have a shapefile ...
2
votes
1answer
180 views

Getting distances between mutiple points and one “central” point using QGIS?

I have a GPS data including static measurements and would like to look more in detail on those static ones. Is it possible to take the point cluster from one measurement (I can extract it by time ...
0
votes
1answer
229 views

QGIS Distance Matrix execution fails

I am trying to use the distance matrix to measure the distance between a crime (input ID) to the closest subway entrance (target layer). The problem is that sometimes the matrix comes out with results,...
1
vote
2answers
503 views

Distance Matrix output

I'm using QGIS 2.18 Las Palmas, and I'm trying to build up a Distance Matrix of a series of points for a Mantel test. Specifically, I have a series of points and I want to calculate the distance of ...
0
votes
0answers
1k views

Creating a distance matrix for line and/or polygon layers?

At 2.18.16, the QGIS tool Distance Matrix computes pairwise distances between all points, either within one layer or between two layers. Here's a screenshot for a single layer. Note that only points ...
3
votes
1answer
179 views

Is there a standard measure of Remoteness?

I have a number of sites around the globe, and they are not uniformly distributed. I would like to use some measure of remoteness, in order to compare sites that are more or less remote. I guess ...
1
vote
0answers
79 views

QGIS-bin.exe stops working when trying to run NN-Join

I am trying to calculate nearest neighbor using the NN-Join add-in. This has worked well until now, but after I updated my data it only partly works. I have a point layer, and I have three other ...
2
votes
1answer
388 views

Calculate distance matrix based on network

I have the following layers in QGIS: origins points destination points a layer of lines that is the route I want to calculate the matrix with the distance from origin to destination using Network ...
1
vote
0answers
75 views

Distance matrix batch process for different area types in one layer

I have a layer of the centroids of all neighbourhoods in a city, with neighbourhood ID and borough ID as attributes of each point. The city is made from boroughs, which are themselves made from ...
0
votes
1answer
877 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)...
2
votes
0answers
166 views

Network Analysis of Multiple points

Is it possible to do a network analysis along a path (road) from multiple points to one point in QGIS? I am trying to calculate the distance from the center of various suburbs to the city center. ...
3
votes
1answer
127 views

mean coordinates and measurement of distances

I am trying to find a location that minimises the total distance to a series of points, and compare it with the distance to an existing location. I used the QGIS tool mean coordinate(s) to calculate ...
3
votes
1answer
71 views

Why does my RAM cap out around 150 MB when doing the Distance Matrix analysis in QGIS?

I am currently trying to determine the 2 nearest points for a database of 8 million people against 425 locations. I have 2 csv files uploaded into QGIS one with a unique number for 8 million people ...
5
votes
1answer
512 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) ...
2
votes
1answer
151 views

How can I use Distance Matrix tool in QGIS with metric distance for global data?

I have 2 point layers spread out all across the globe. I would like to use the Distance Matrix tool, and would like to get the distances in metres or kilometres. I'm aware that I have to change the ...
2
votes
0answers
77 views

How do I measure shortest distance where it crosses +/- 180 (the International Date line)

I'm trying to measure the shortest distance between two sets of points on the globe in QGIS. One set of points is close to -180 and the other close to +180, QGIS Distance matrix is giving me a ...
1
vote
0answers
40 views

Estimating road network distances when database queries are expensive

I have a large number N of points and I'd like to build their distance matrix with respect to a road network. Unfortunately, I am not able to perform all N^2 queries to build this matrix, so some ...
2
votes
4answers
678 views

Creating a Point at a specific distance between two Points

I am trying to create a new point shapefile and I am unsure how to create it. I want to create a new series of points that would be based on a specific distance between two points in an existing ...
0
votes
1answer
102 views

Obtaining contiguity matrix from layer of polygons using ArcGIS Desktop?

I have a layer of statistical areas, and would like to obtain the contiguity matrix, that is, the matrix W in which an entry w_ij equals 1 if i and j are neighbors (share a border) and 0 otherwise. ...
2
votes
1answer
466 views

Distance matrix returning incorrect values in QGIS 2.18

I'm having issues with the distance matrix tool in QGIS 2.18 giving output distances that do not match the distance using the measuring tool. I've checked previous threads and so far can't find an ...
-2
votes
1answer
180 views

Need to calculate distance (Node to Node) along the lines [closed]

I have a Shapefile (polygon), I need to calculate distance (Node to Node) along the lines in map unit(meter or kilometer). I want to do it in ArcGIS.
2
votes
1answer
877 views

Distance Matrix PostGis

Assuming I have a table or 2 dimensional array with only geometries and names (all in all 5k elements) name the_geom a polygon_geometry.... b polygon_geometry.... c ...
2
votes
0answers
255 views

Calculate Great Circle Distance between two point layers via way point

I need to create three distance matrices for around 550 points spread throughout Africa, Europe and Asia. The first matrix represents great circle distances, the second is the shortest distance along ...
1
vote
2answers
59 views

Error in pairdist calculation

I'm trying to calculate pair distances among the points of my dataset. I have point in EPSG:3857. This is the code I ran: I import the data, then: coordinates(datPb) <- c("X","Y") proj4string(...