I am looking to create a Python script that will take X,Y coordinates from one field in an attribute table, compare them to another set of X,Y coordinates in a different field, and populate a field with the shortest distance between those two points based on a road layer. So just to visualize it..

Origin:X,Y      Destination:X,Y         Distance: 130.34km
  • Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and code so far. For more info, you can check our faq. – underdark Feb 20 '15 at 23:36
  • Is there a reason you want to create a plugin? The attribute table tool already has built-in functions to compute complex expressions such as the distance between two points. – ArMoraer Jan 14 '16 at 15:38

Browse other questions tagged or ask your own question.