Made Function more generic

Adjusted script to accommodate non-unique settlement "Names" by making
a dummy settlement_id variable.
Incorporated Zaiming's adjusted euclidean distance function that
accomodates UTM coordinates too.
Added a "root" variable to output - doesn't work for subnetworks
though...