Index: /trunk/test/atmsdriver/model/PostmileCoordsTest.java
===================================================================
--- /trunk/test/atmsdriver/model/PostmileCoordsTest.java	(revision 244)
+++ /trunk/test/atmsdriver/model/PostmileCoordsTest.java	(revision 244)
@@ -0,0 +1,69 @@
+
+package atmsdriver.model;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.Iterator;
+import java.util.Scanner;
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author jdalbey
+ */
+public class PostmileCoordsTest extends TestCase
+{
+    private PostmileCoords pmc;
+    
+    public PostmileCoordsTest(String testName)
+    {
+        super(testName);
+    }
+    
+    @Override
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+    
+    @Override
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public void testLoad() throws FileNotFoundException
+    {
+
+        System.out.println("load");
+        String line1 = "ORA 4 5.55, 33.33, -117.117\nORA 4 6.66, 33.33, -117.117";
+        Scanner scan = new Scanner(line1).useDelimiter("\\A"); 
+        pmc = new PostmileCoords();
+        pmc.load(scan);
+        PostmileCoords.Postmile pm = new PostmileCoords.Postmile("ORA 4 5.55", "33.33", "-117.117");
+        assertEquals(pmc.get(0),pm);
+        assert(pmc.size() == 2);
+    }
+    public void testIterator() throws FileNotFoundException
+    {
+        System.out.println("iterator");
+        testLoad();
+        int count = 0;
+        for (Object pm: pmc)
+        {
+            count++;
+        }
+        assert(count == 2);
+    }
+    public void testFind() throws FileNotFoundException
+    {
+        System.out.println("find");
+        testLoad();
+        PostmileCoords.Postmile result = pmc.find("ORA 4 6.66");
+        assertNotNull(result);
+        PostmileCoords.Postmile pm = new PostmileCoords.Postmile("ORA 4 6.66", "33.33", "-117.117");
+        assertEquals(pm,result);
+        PostmileCoords.Postmile result2 = pmc.find("X");
+        assertNull(result2);
+    }
+}
Index: /trunk/src/atmsdriver/model/PostmileCoords.java
===================================================================
--- /trunk/src/atmsdriver/model/PostmileCoords.java	(revision 244)
+++ /trunk/src/atmsdriver/model/PostmileCoords.java	(revision 244)
@@ -0,0 +1,111 @@
+
+package atmsdriver.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Scanner;
+
+/**
+ * PostmileCoords is a collection of Postmiles (id and LatLong Coordinates).
+ * @author jdalbey
+ */
+public class PostmileCoords implements Iterable
+{
+    private List<Postmile> postmileList;
+    public PostmileCoords()
+    {
+        postmileList = new ArrayList<Postmile>();
+    }
+    /** Accessor to value at given index */
+    public Postmile get(int idx)
+    {
+        return postmileList.get(idx);
+    }
+    /** Return the size */
+    public int size()
+    {
+        return postmileList.size();
+    }
+    /** Find the postmile with the given name */
+    public Postmile find(String target)
+    {
+        int idx = 0;
+        while (idx < postmileList.size() && !postmileList.get(idx).nameEquals(target))
+        {
+            idx++;
+        }
+        if (idx < postmileList.size())
+        {
+            return postmileList.get(idx);
+        }
+        else
+        {
+            return null;
+        }
+    }
+    /** Load the postmile list from external file */
+    public void load(Scanner scan)
+    {
+        String out = scan.next();
+        //  split into an array 
+        String[] results = out.split("\\n");
+        for (String item : results)
+        {
+            String[] fields = item.split(",");
+            Postmile pm = new Postmile(fields[0],fields[1],fields[2]);
+            postmileList.add(pm);
+        }
+    }
+
+    @Override
+    public Iterator iterator()
+    {
+        return postmileList.iterator();
+    }
+    /**
+     *  Postmile is a postmile id and its LatLong Coordinates.
+     */
+    final static class Postmile  
+    {
+        String name;  // the postmile name or id
+        String latitude; // the latitude coordinate for this postmile
+        String longitude; // the longitude coordinate for this postmile
+        public Postmile(String name, String lat, String longitude)
+        {
+            this.name = name.trim();
+            this.latitude = lat.trim();
+            this.longitude = longitude.trim();
+        }
+        public boolean nameEquals(String target)
+        {
+            return this.name.equals(target);
+        }
+        @Override public boolean equals(Object aThat) 
+        {
+            if (this == aThat) return true;
+            if (!(aThat instanceof Postmile)) return false;
+            Postmile that = (Postmile) aThat;
+            boolean r1 = this.name.equals(that.name);
+            boolean r2 = this.latitude.equals(that.latitude);
+            boolean r3 = this.longitude.equals(that.longitude);
+            return r1 && r2 && r3;
+        }
+        @Override public String toString()
+        {
+            return name + ": " + latitude +","+ longitude;
+        }
+        public String toJson()
+        {
+            String kFeature = "\n{\n   \"type\": \"Feature\",\n   \"id\": \"";
+            String kPoint = "\", \n     \"geometry\":\n       {\n        \"type\": \"Point\",\n        \"coordinates\": [";
+            String kProp = "]\n" +
+"      },\n" +
+"      \"properties\": \n" +
+"        {\"color\": \"green\"";
+            String kTail = "}\n" +
+"    },";
+            return kFeature + name + kPoint + longitude + "," + latitude + kProp + kTail;
+        }
+    }
+}
