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
1
vote
0answers
22 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 ...
1
vote
1answer
29 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 ...
1
vote
0answers
51 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 ...
2
votes
2answers
44 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 ...
0
votes
0answers
16 views

Spatially constrained multivariate clustering

What's the current methodology for clustering geospatial data by features? Not in ArcGIS - rolling my own in a different framework. Example: I have some demographic dataset. Let's say this contains ...
0
votes
0answers
34 views

What are the units in the network analysis

. I'm working on a project that is checking to see if distance is related to colonization by invasive species based on human activity. In order to do that, I must calculate the distances between ...
1
vote
1answer
26 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 <- ...
2
votes
2answers
166 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 ...
2
votes
1answer
48 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 ...
0
votes
1answer
62 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 ...
5
votes
1answer
111 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)...
3
votes
2answers
54 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 ...
0
votes
1answer
45 views

Distance matrix expressed in meters

I'm aware that this is the hundreth(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, etc.,...
0
votes
0answers
44 views

QGIS Distance Matrix tool

I want a distance matrix to calculate the mean distance between all points and all points with a common attribute (postcode district) in a single layer. Is there any way of doing this in QGIS? As an ...
0
votes
0answers
90 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 ...
2
votes
0answers
23 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 ...
1
vote
0answers
79 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 ...
0
votes
1answer
32 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 ...
1
vote
1answer
124 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 ...
0
votes
0answers
19 views

Restricting destinations by municipality in ArcMap OD cost matrix (but allowing for travel outside municipalities)

I am running an OD cost matrix using the Network Analyst extension in ArcMap. I want to restrict the destinations for each origin to those in the origin’s own municipality, but I still want to use the ...
2
votes
1answer
59 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 ...
1
vote
0answers
51 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 ...
1
vote
0answers
55 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 ...
3
votes
1answer
201 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 ...
2
votes
0answers
26 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
123 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
569 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
121 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 ...
2
votes
0answers
52 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
549 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
80 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
98 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 ...
2
votes
1answer
136 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
106 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
289 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
364 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
261 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
114 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
174 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
91 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 ...
5
votes
1answer
1k 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
525 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
117 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
347 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
527 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
422 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
565 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
309 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
243 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 ...
1
vote
1answer
357 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,...