public TestSiteDataProviders_Operational() {
   locs.add(loc1);
   locs.add(loc2);
   locs.add(loc3);
   locs.add(loc4);
   locs.add(loc5);
 }
 /**
  * get a list of locations that constitutes the perimeter (forst row, last col, last row, and
  * first col)
  */
 public LocationList getSurfacePerimeterLocsList() {
   LocationList locList = new LocationList();
   for (int c = 0; c < getNumCols(); c++) locList.add(get(0, c));
   for (int r = 0; r < getNumRows(); r++) locList.add(get(r, getNumCols() - 1));
   for (int c = getNumCols() - 1; c >= 0; c--) locList.add(get(getNumRows() - 1, c));
   for (int r = getNumRows() - 1; r >= 0; r--) locList.add(get(r, 0));
   return locList;
 }
Ejemplo n.º 3
0
 /**
  * Reads location list (each location being specified by a doublet (longitude,latitude)) and
  * returns a {@link LocationList}
  */
 private LocationList get2DLocList(Element posList) {
   LocationList locList = new LocationList();
   String positionList = (String) posList.getData();
   StringTokenizer st = new StringTokenizer(positionList);
   while (st.hasMoreTokens()) {
     double lon = Double.valueOf(st.nextToken());
     double lat = Double.valueOf(st.nextToken());
     locList.add(new Location(lat, lon));
   }
   return locList;
 }
 /**
  * Put all the locations of this surface into a location list
  *
  * @return
  */
 public LocationList getLocationList() {
   LocationList locList = new LocationList();
   Iterator<Location> it = listIterator();
   while (it.hasNext()) locList.add((Location) it.next());
   return locList;
 }
Ejemplo n.º 5
0
 /**
  * It returns a list of all the locations which make up the surface for this source.
  *
  * @return LocationList - List of all the locations which constitute the surface of this source
  */
 public LocationList getAllSourceLocs() {
   LocationList locList = new LocationList();
   locList.add(this.location);
   return locList;
 }