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
11
votes
2answers
719 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 ...
11
votes
1answer
962 views

Efficiently calculate distance between raster patch edges

I have a binary raster which I've classified into patches using raster::clump. I now want to efficiently calculate the edge-to-edge, i.e. minimum, pairwise distance between patches. I am currently ...
10
votes
1answer
274 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 ...
7
votes
2answers
2k 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 ...
7
votes
2answers
5k views

Calculating distance between points of same layer using QGIS?

I am using QGIS 2.13 and a layer with hundreds of points. I need to calculate the distance to the nearest point... in the same layer. I tried the distance matrix but I get 0m since the "closest" point ...
6
votes
1answer
959 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) ...
6
votes
3answers
777 views

Vincenty or (Project + Euclidean) for accurate distances

I posted a similar question on stackoverflow, however was directed here for more help. If my main goal was to calculate distances such that my error was minimised to the nearest metre assuming that ...
6
votes
3answers
8k views

Need to get distance matrix for large set of points on-the-fly [closed]

I do not know much about GIS and I do not know much of the jargon. Hopefully you can help me a bit here because I am really unaware of the services and software available. My problem is as follows: ...
5
votes
2answers
800 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 ( ...
5
votes
2answers
3k views

Performing Point Distance analysis using Basic level license of ArcGIS Desktop?

I am using ArcView (ArcGIS Desktop Basic) 10.1 and I need to perform a point distance analysis. What are the steps to determine the distance from A to B-Z, B to A-Z, C to A-Z, etc?
5
votes
3answers
218 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 ...
5
votes
1answer
342 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)...
5
votes
1answer
4k views

How to calculate the average distance among set of points as measure of closeness

I have three series (or tables) of points in PostGIS which I want to compare. I would like to know how "close" each series is when compared to the other two. In other words I would need some measure ...
5
votes
1answer
2k 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 ...
4
votes
1answer
1k views

What algorithm does QGIS use to calculate Nearest Neighbor Index?

I'm carrying out nearest neighbor analysis on a set of geological features in QGIS, trying to find out whether they're clustered or not. I've calculated the nearest neighbor distances using the '...
4
votes
1answer
813 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 (...
4
votes
1answer
777 views

What is an efficient Algorithm to draw a straight line from points?

I have some cross section survey data, which is like this: X Y Z pt_dt 2970969.635 359725.0088 83.4242 1-x 2970968.278 359722.2182 83.2591 1-x 2970941.771 359670.127 83.0655 1-x 2970961.369 359708....
4
votes
1answer
710 views

How do I calculate the distance among all points in set in QGIS?

I am a very new user of any GIS. In QGIS I have input my UTM data as a CSV file. Under Vector -> Analysis Tools -> Distance Matrix, I have been able to create a distance matrix but it just takes one ...
4
votes
2answers
1k views

How to get the center line between two linestrings

Where is the track of a ship when it is shipping always in the center of the English Channel between the coasts of Great Britain and France? I started with 2 linestrings and I created a lot of ...
4
votes
1answer
133 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 ...
4
votes
2answers
393 views

Input field not showing up in Distance Matrix In QGIS 2.0?

I tried to perform a Distance Matrix analysis of building centroids. I have a two building centroid layers. The attributes in both the tables are name, osm_id, perimeter and area. In the Distance ...
4
votes
0answers
351 views

Using Proximity tool in QGIS 2.16

I am using the proximity algorithm to generate a raster proximity map indicating the distance from the coast (points shapefile) of my study area and the center of each planning units (I have divided ...
3
votes
1answer
330 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 ...
3
votes
1answer
1k 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 ...
3
votes
2answers
466 views

Where has the 'distance matrix' tool gone in QGIS 2.18.0?

Today I installed QGIS 2.18.0 and I wondered, where has my 'distance matrix' - Tool gone?
3
votes
1answer
6k 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 ...
3
votes
1answer
3k views

QGIS: Distance units in CRS layer: WGS 84

First post so please bear with me. When I run a vector analysis on two shapefile layers with multiple points, I get a distance as my answer. What are the units on this distance?
3
votes
1answer
242 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 ...
3
votes
1answer
182 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
79 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 ...
3
votes
1answer
688 views

Distance between points along polyline ArcGIS for Desktop (pt. 2)?

I read over the solution in Distance between points along polyline ArcGIS for Desktop? and I have a slight variation of that problem: I need to find the distance of each red point (transformers) from ...
3
votes
2answers
3k views

Distance matrix (metres instead of degrees) in QGIS?

I have a problem related to the distance matrix in QGIS (2.12.0). Instead of meters it calculates distances in degrees. I found that some other users faced also this problem. I tried to solve it ...
3
votes
1answer
229 views

Distance matrix tool, how to include distances at 0 metres?

I have used the Vector -> Analysis Tools -> Distance matrix to merge two datasets by the closest points. But in my output csv file, the points that match exactly, or that has 0 metres between them ...
3
votes
1answer
654 views

Script to export OD matrix line tables for individual point features

I have a network dataset and I would like to know the network distance (not Euclidean) from each feature point in a shapefile to each other point in another shapefile with the same number of points. ...
3
votes
1answer
114 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 ...
2
votes
2answers
411 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
3answers
84 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 ...
2
votes
1answer
5k views

QGIS distance matrix in meter instead of decimal degrees

I'd be thankful for your help. 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 ...
2
votes
1answer
3k views

OSM table(Matrix) Api returning distance 0 for small routes

I am building a webservice which returns distance of various shops, from lat,long received from mobile. For that I want to use osm table api, but it return zero for search on lat,long: Click on link:...
2
votes
2answers
1k views

Shortest Path Matrix with QGIS/GRASS

I am analyzing Germany's high voltage electricity grid. I extracted the data from OSM, imported it in QGIS and simplified its structure by hand, specifically creating single nodes where power lines ...
2
votes
1answer
235 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?
2
votes
1answer
289 views

Automatically creating 10,000 sets of random points for further analysis in QGIS?

I'm using QGIS and would like to know if I can automate generating multiple sets of random points and mean distances? I have a data set consisting over 600 coordinate points for Mistletoe across ...
2
votes
1answer
110 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 ...
2
votes
2answers
805 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 ...
2
votes
2answers
2k views

Problem with Distance Matrix in Qgis 2.83

I want to calculate the distance of archaeological sites to the nearest river. Following this question Calculating minimum distance between points and polygons in QGIS? I extracted the nodes of the ...
2
votes
2answers
2k views

driving time to the nearest facility using pgrouting

I'm using pgrouting 2.0 and postgis in postgresql. My problem is to calculate the driving time to the closest facility for each node of my OSM derived network. These are the steps to be implemented (...
2
votes
1answer
321 views

What is the best method for route cost estimation? [closed]

What would be the best method for calculating a rough adhoc route cost i.e. a potential road (been some years since I have used Network Analysis in ArcGIS), alternatively would it be better using ...
2
votes
2answers
514 views

QGIS distance matrix: wrong metric distance

I used the lineair distance matrix tool in QGIS 2.6 My coordination system is metric (national Dutch RD new) The results have the wrong decimals, as shown below. How can I fix this? (showing unique ...
2
votes
1answer
373 views

How does fTools' Distance Matrix compute the distance and in what units?

I am new to GIS in general, and QGIS in particular. I am trying to find information about fTools' Distance Matrix function in QGIS, but am having trouble finding documentation…I managed to make a ...
2
votes
2answers
1k views

Find network distance for multiple origins and destinations?

I have a layer of points A (around 30), a layer of points B (around 2000), all recorded as in longitude and latitude. Need to calculate the distance between each pair (Ai, Bj) based on the ...