private string CalcFinalResults(double nLonOrg, double nLatOrg, OsmData[] array, string strAdminpwd, string strCSVtitle) { //initialaize the result string string result = string.Empty; //let's check if we have data to calculate in the selected area //if not we will put 10 - means that there is not streets and the selected location //is very quite if (array == null || array.Length == 1) { return("10.0"); } if (strAdminpwd == "AGER44221") { //let's classify the distances accroding to style groups //CalculateDistanceAndClassify (ref arrayNoDuplicates, nLonOrg, nLatOrg); CalculateDistanceAndClassify(ref array, nLonOrg, nLatOrg); //let's convert back the array to csv format //result = ConvertArrtoCsv(",", arrrayNoDuplicates); CsvConverter csvConverter = new CsvConverter(); strCSVtitle += ",type,decibles"; if (!m_IncludeTitle) { strCSVtitle = ""; } csvConverter.strCSVTitle = strCSVtitle; csvConverter.strSaperator = ","; result = csvConverter.ConvertArrtoCsv(array); } else { //let's calculate the overall center point decibles value //result = Math.Round(CalculateDistanceAndDecibleEquAll(arrayNoDuplicates),3).ToString() + " Db"; result = Math.Round(CalculateDistanceAndDecibleEquAll(array), 3).ToString(); } return(result); }