Examples of LatLonRect


Examples of ucar.unidata.geoloc.LatLonRect

  private LatLonRect getBoundingBox(List stnList) {
    ucar.unidata.geoloc.Station s = (ucar.unidata.geoloc.Station) stnList.get(0);
    LatLonPointImpl llpt = new LatLonPointImpl();
    llpt.set(s.getLatitude(), s.getLongitude());
    LatLonRect rect = new LatLonRect(llpt, .001, .001);

    for (int i = 1; i < stnList.size(); i++) {
      s = (ucar.unidata.geoloc.Station) stnList.get(i);
      llpt.set(s.getLatitude(), s.getLongitude());
      rect.extend(llpt);
    }

    return rect;
  }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

    double lat_max = getAttAsDouble( ds, "geospatial_lat_max");
    double lat_min = getAttAsDouble( ds, "geospatial_lat_min");
    double lon_max = getAttAsDouble( ds, "geospatial_lon_max");
    double lon_min = getAttAsDouble( ds, "geospatial_lon_min");

    return new LatLonRect(new LatLonPointImpl(lat_min, lon_min), lat_max-lat_min, lon_max-lon_min);
  }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

      CoordinateAxis1D vaxis = gcs.getVerticalAxis();
      if (vaxis != null) {
        grid.vc = getVertCoordinate(vaxis);
      }

      LatLonRect rect = gcs.getLatLonBoundingBox();
      if (null == bb)
        bb = rect;
      else if (!bb.equals(rect))
        bb.extend(rect);
    }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

    if (bbElem != null) {
      double west = Double.parseDouble(bbElem.getAttributeValue("west"));
      double east = Double.parseDouble(bbElem.getAttributeValue("east"));
      double north = Double.parseDouble(bbElem.getAttributeValue("north"));
      double south = Double.parseDouble(bbElem.getAttributeValue("south"));
      fmr.bb = new LatLonRect(new LatLonPointImpl(south, west), new LatLonPointImpl(north, east));
    }

    return fmr;
  }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

      ucar.nc2.Attribute att = (ucar.nc2.Attribute) atts.next();
      rootElem.addContent(ucar.nc2.ncml.NcMLWriter.writeAttribute(att, "attribute", null));
    } */

    // add lat/lon bounding box
    LatLonRect bb = sobs.getBoundingBox();
    if (bb != null)
      rootElem.addContent( writeBoundingBox( bb));

    // add date range
    Date start  = sobs.getStartDate();
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

    setEndDate();
    setBoundingBox();
  }

  protected void setBoundingBox() {
    LatLonRect bb;

    if (origin == null)
      return;

    double dLat = Math.toDegrees( getMaximumRadialDist() / Earth.getRadius());
    double latRadians = Math.toRadians( origin.getLatitude());
    double dLon = dLat * Math.cos(latRadians);

    double lat1 = origin.getLatitude() - dLat/2;
    double lon1 = origin.getLongitude() - dLon/2;
    bb = new LatLonRect( new LatLonPointImpl( lat1, lon1), dLat, dLon);

    boundingBox = bb;
  }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

            return null;

          Station s =  (Station) stations.get(0);
          LatLonPointImpl llpt = new LatLonPointImpl();
          llpt.set( s.getLocation().getLatitude(), s.getLocation().getLongitude());
          rect = new LatLonRect(llpt, .001, .001);

          for (int i = 1; i < stations.size(); i++) {
            s =  (Station) stations.get(i);
            llpt.set( s.getLocation().getLatitude(), s.getLocation().getLongitude());
            rect.extend( llpt);
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

      envelopeElem = new Element( "Envelope", wcsNS );

    // spatialDomain/Envelope@srsName [0..1] (URI)
    envelopeElem.setAttribute( "srsName", "urn:ogc:def:crs:OGC:1.3:CRS84" );

    LatLonRect llbb = gcs.getLatLonBoundingBox();
    LatLonPoint llpt = llbb.getLowerLeftPoint();
    LatLonPoint urpt = llbb.getUpperRightPoint();

    double lon = llpt.getLongitude() + llbb.getWidth();
    int posDim = 2;
    String firstPosition = llpt.getLongitude() + " " + llpt.getLatitude();
    String secondPosition = lon + " " + urpt.getLatitude();
    // ToDo WCS 1.0Plus - Deal with conversion to meters. (Yikes!!)
    CoordinateAxis1D vertAxis = gcs.getVerticalAxis();
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

    }

    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))
//    {
//      log.error( "genRequestLatLonBoundingBox(): BBOX <" + bbox + "> not contained in coverage BBOX <"+ covLatLonRect.toString2()+">.");
//      throw new WcsException( WcsException.Code.InvalidParameterValue, "BBOX", "BBOX <" + bbox + "> not contained in coverage.");
//    }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonRect

    count++;
    if (!calcBounds) return;
    if (pf == null) return;

    if (bb == null)
      bb = new LatLonRect(pf.getLocation().getLatLon(), .001, .001);
    else
      bb.extend(pf.getLocation().getLatLon());

    if (timeUnit == null)
      timeUnit = pf.getTimeUnit();
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.