public static void FESVoDistanceFrequency (int src)
    {
        // sorted sets for x and y values:
        TreeSet<Integer> setX = new TreeSet<Integer>();
        TreeSet<Integer> setY = new TreeSet<Integer>();
        
        for (GeoTag tag : DATA.keySet()){
            if (tag.sourceID == src){
                setX.add(tag.x);
                setY.add(tag.y);
            }//if
        }//for
        
        
        // Mapping distance to its frequency:
        Map<Integer, Integer> freqX = new HashMap<Integer, Integer>();
        Map<Integer, Integer> freqY = new HashMap<Integer, Integer>();
        
        // calculate distance frequency for X:
        Object [] x = setX.toArray();
        for (int i=0; i < x.length-1; i+=2){
            // calculate distance:
            int dis = ((Integer)x[i+1]).intValue() - ((Integer)x[i]).intValue();
            
            // update frequency:
            Integer freq = freqX.get(dis);
            freqX.put(dis, (freq == null? 1 : freq+1));
        }
        
        // calculate distance frequency for Y:
        Object [] y = setY.toArray();
        for (int i=0; i < y.length-1; i+=2){
            // calculate distance:
            int dis = ((Integer)y[i+1]).intValue() - ((Integer)y[i]).intValue();
            
            // update frequency:
            Integer freq = freqY.get(dis);
            freqY.put(dis, (freq == null? 1 : freq+1));
        }
        
        // print results to file:
        
        FESVoSystem.out.println("X Distance Frequency:");
        FESVoSystem.out.println("---------------------");
        for (Integer disX : freqX.keySet()){
            FESVoSystem.out.println(disX + ": " + freqX.get(disX));
        }//for
        
        FESVoSystem.out.println("\n");
        FESVoSystem.out.println("Y Distance Frequency:");
        FESVoSystem.out.println("---------------------");
        for (Integer disY : freqY.keySet()){
            FESVoSystem.out.println(disY + ": " + freqY.get(disY));
        }//for
        
    }