Examples of LatLonRect


Examples of ucar.unidata.geoloc.LatLonRect

    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.LatLonRect

  }

  private LatLonRect llbb = null;
  private void trackBB(EarthLocation loc) {
    if (llbb == null) {
      llbb = new LatLonRect(loc.getLatLon(), .001, .001);
      return;
    }
    llbb.extend(loc.getLatLon());
  }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

  public StationFeatureImpl(Station s, DateUnit timeUnit, int npts) {
    super(s.getName());
    this.s = s;
    this.timeUnit = timeUnit;
    this.npts = npts;
    setBoundingBox( new LatLonRect(s.getLatLon(), .0001, .0001));
  }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

  }

  public void calcBounds() throws java.io.IOException {
    if ((boundingBox != null) && (dateRange != null)) return;

    LatLonRect bb = null;
    DateRange dates = null;
    for (FeatureCollection fc : collectionList) {

      if (fc instanceof PointFeatureCollection) {
        PointFeatureCollection pfc = (PointFeatureCollection) fc;
        pfc.calcBounds();
        if (bb == null)
          bb = pfc.getBoundingBox();
        else
          bb.extend(pfc.getBoundingBox());
        if (dates == null)
          dates = pfc.getDateRange();
        else
          dates.extend(pfc.getDateRange());

      else if (fc instanceof StationTimeSeriesFeatureCollection) {

        StationTimeSeriesFeatureCollection sc = (StationTimeSeriesFeatureCollection) fc;
        if (bb == null)
           bb = sc.getBoundingBox();
         else
           bb.extend(sc.getBoundingBox());

        PointFeatureCollection pfc = sc.flatten(null, null);
        pfc.calcBounds();
        if (dates == null)
          dates = pfc.getDateRange();
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

    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.LatLonRect

          StationTimeSeriesFeatureCollection stsfc =
                  (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")));
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

    boolean sample = true;
    for (int time = 0; time < 2; time++) {
      sample = time < 1;
      FeatureCollection fc = collectionList.get(0);
      PointFeatureCollection collection = null;
      LatLonRect llr = null; // new LatLonRect(new LatLonPointImpl(33.4, -92.2), new LatLonPointImpl(47.9, -75.89));
      System.out.println("llr = " + llr);
      if (fc instanceof PointFeatureCollection) {
        collection = (PointFeatureCollection) fc;
        if (llr != null) {
          collection = collection.subset(llr, null);
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

    sf.format("  title= %s\n",getTitle());
    sf.format("  desc= %s\n",getDescription());
    sf.format("  range= %s\n",getDateRange());
    sf.format("  start= %s\n", formatter.toDateTimeString(getStartDate()));
    sf.format("  end  = %s\n",formatter.toDateTimeString(getEndDate()));
    LatLonRect bb = getBoundingBox();
    sf.format("  bb   = %s\n", bb);
    if (bb != null)
      sf.format("  bb   = %s\n",getBoundingBox().toString2());

    sf.format("  has netcdf = %b\n", (getNetcdfFile() != null));
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

        Element metaElem    = readElements(dsElem, "metadata");
        // HashMap stationHMap = readSelectStations(metaElem, ns);
        String sts = dsc_location.replaceFirst("dataset.xml", "stations.xml");
        HashMap<String,Station>       stationHMap   = readRadarStations(sts);
        LatLonRect    radarRegion   = readSelectRegion(metaElem, ns);
        List<String>  radarTimeSpan = readSelectTime(metaElem, ns);
        List<Product> productList   = readSelectVariable(metaElem, ns);
        String        summary       = readSelectDocument(metaElem, ns);

        // gotta have these
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

        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
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.