Examples of LatLonPointImpl


Examples of ucar.unidata.geoloc.LatLonPointImpl

        return rect;
    }

    public List getStations(LatLonRect boundingBox, CancelTask cancel) throws IOException {
        LatLonPointImpl latlonPt = new LatLonPointImpl();
        ArrayList result = new ArrayList();
        List stationC = radarCollection.getStations();
        for (int i = 0; i < stationC.size(); i++) {
          Station s =  (Station) stationC.get(i);
          latlonPt.set( s.getLocation().getLatitude(), s.getLocation().getLongitude());
          if (boundingBox.contains( latlonPt))
            result.add( s);
          if ((cancel != null) && cancel.isCancel()) return null;
        }
        return result;
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

     }

    /** Get all the Stations within a bounding box.
     * @return List of Station */
    public List getStations( LatLonRect boundingBox)throws IOException {
        LatLonPointImpl latlonPt = new LatLonPointImpl();
        ArrayList result = new ArrayList();
        List stationC = radarCollection.getStations();
        for (int i = 0; i < stationC.size(); i++) {
          Station s =  (Station) stationC.get(i);
          latlonPt.set( s.getLocation().getLatitude(), s.getLocation().getLongitude());
          if (boundingBox.contains( latlonPt))
            result.add( s);
        }
        return result;

View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

      location = new ucar.unidata.geoloc.EarthLocationImpl( lat, lon, alt);
    }

    public LatLonPoint getLatLon() {
      if (llpt == null)
         llpt = new LatLonPointImpl( location.getLatitude(), location.getLongitude());
      return llpt;
    }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

      String message = "BBOX item(s) have incorrect number format [not double] <" + bboxSplit.toString() + ">.";
      log.error( "genRequestLatLonBoundingBox(): " + message + " - " + e.getMessage());
      throw new WcsException( WcsException.Code.InvalidParameterValue, "BBOX", message );
    }

    LatLonPointImpl minll = new LatLonPointImpl( miny, minx );
    LatLonPointImpl maxll = new LatLonPointImpl( maxy, maxx );

    LatLonRect requestLatLonRect = new LatLonRect( minll, maxll );

    LatLonRect covLatLonRect = gcs.getLatLonBoundingBox();
//    if ( ! requestLatLonRect.containedIn( covLatLonRect))
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

    if (!calcBounds) return;

    if ((bb != null) && bb.crossDateline() && (bb.getWidth() > 350.0)) { // call it global - less confusing
      double lat_min = bb.getLowerLeftPoint().getLatitude();
      double deltaLat = bb.getUpperLeftPoint().getLatitude() - lat_min;
      bb = new LatLonRect(new LatLonPointImpl(lat_min, -180.0), deltaLat, 360.0);
    }

    if (collection != null) {
      if (collection.getBoundingBox() == null)
        collection.setBoundingBox(bb);
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

    int nx = xData.length;
    int ny = yData.length;

    // create the data
    ProjectionPointImpl projPoint = new ProjectionPointImpl();
    LatLonPointImpl latlonPoint = new LatLonPointImpl();
    double[] latData = new double[nx * ny];
    double[] lonData = new double[nx * ny];
    for (int i = 0; i < ny; i++) {
      for (int j = 0; j < nx; j++) {
        projPoint.setLocation(xData[j], yData[i]);
        proj.projToLatLon(projPoint, latlonPoint);
        latData[i * nx + j] = latlonPoint.getLatitude();
        lonData[i * nx + j] = latlonPoint.getLongitude();
      }
    }
    Array latDataArray = Array.factory(DataType.DOUBLE, new int[]{ny, nx}, latData);
    latVar.setCachedData(latDataArray, false);

View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

    DateFormatter format = new DateFormatter();
    Date start = format.isoDateTimeFormat("2005-12-06T18:00:00Z");
    Date end = format.isoDateTimeFormat("2005-12-07T18:00:00Z");

    writer.makeFile(fileOut, gds, gridList,
            new LatLonRect(new LatLonPointImpl(37, -109), 400, 7),
            new DateRange(start, end),
            true,
            1, 1, 1);

  }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

                  (StationTimeSeriesFeatureCollection) fc;
          // subset criteria not important, just want to get data
          // into flattened representation
          PointFeatureCollection pfc = stsfc.flatten(
                  new LatLonRect(
                          new LatLonPointImpl(-90, -180),
                          new LatLonPointImpl(90, 180)),
                  new DateRange(
                          df.parse("1900-01-01"),
                          df.parse("2100-01-01")));
          PointFeatureIterator pfi = pfc.getPointFeatureIterator(-1);
          try {
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

        Element east  = region.getChild("east", ns);
        String  ev    = east.getValue();
        Element west  = region.getChild("west", ns);
        String  wv    = west.getValue();

        LatLonPointImpl p1 = new LatLonPointImpl(Double.valueOf(sv),
                                 Double.valueOf(wv));
        LatLonPointImpl p2 = new LatLonPointImpl(Double.valueOf(nv),
                                 Double.valueOf(ev));
        LatLonRect llr = new LatLonRect(p1, p2);


        return llr;
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

        List      sl  = selStation.getStations();
        ArrayList dsl = new ArrayList();

        for (Iterator it = sl.iterator(); it.hasNext(); ) {
            Station         s        = (Station) it.next();
            LatLonPointImpl latlonPt = new LatLonPointImpl();
            latlonPt.set(s.getLocation().getLatitude(),
                         s.getLocation().getLongitude());
            if (boundingBox.contains(latlonPt)) {
                dsl.add(s);
            }
            if ((cancel != null) && cancel.isCancel()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.