I'm completely new using PyQGIS and developing plugins.
Currently I have a layer with the X and Y coordinates of electric distribution poles, where each pole is a feature. What I need to do is measure the distance between all the features in the map, but it must be done pole by pole. By example, take the first pole and get all the distances between the first pole and all the others, then, take the second pole and repeat until the end of the dataset.
Any ideas or references for doing this?
As a reference, I was doing the same thing in Matlab with a dataset of 20 features with something like this:
for i=1:20 for j=1:20 if i~=j distance = euclidean(P1(i), P1(j));
Where P1(i) and P1(j) are the X-Y coordinates of two different points (Each one Written as a complex number) and "euclidean" is a function that calculates the distance between these two points.