Package ucar.unidata.geoloc

Examples of ucar.unidata.geoloc.LatLonRect


      return null;

    LatLonPointImpl minll = new LatLonPointImpl( bbox.getMinPointValue( 1 ), bbox.getMinPointValue( 0 ));
    LatLonPointImpl maxll = new LatLonPointImpl( bbox.getMaxPointValue( 1 ), bbox.getMaxPointValue( 0 ) );

    LatLonRect bboxLatLonRect = new LatLonRect( minll, maxll );

//    if ( ! bboxLatLonRect.containedIn( covLatLonRect))
//    {
//      log.error( "convertBoundingBox(): 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


      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 - Add vertical (Deal with conversion to meters. Yikes!!)
//    CoordinateAxis1D vertAxis = gcs.getVerticalAxis();
View Full Code Here

    List<String> gridList = new ArrayList<String>();
    gridList.add(varName);

    NetcdfCFWriter writer = new NetcdfCFWriter();
    writer.makeFile(fileOut, gds, gridList,
            new LatLonRect(new LatLonPointImpl(30, -109), 10, 50),
            null,
            true,
            1, 1, 1);

    gds.close();
View Full Code Here

    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

      testStation( sod, (ucar.unidata.geoloc.Station) stations.get(n-1));
      testStation( sod, (ucar.unidata.geoloc.Station) stations.get((n-1)/2));
    }

    // make a new bb
    LatLonRect bb = sod.getBoundingBox();
    assert null != bb;
    double h = bb.getUpperRightPoint().getLatitude() - bb.getLowerLeftPoint().getLatitude();
    LatLonRect bb2 = new LatLonRect(bb.getLowerLeftPoint(), bb.getWidth()/2, h/2);

    List<ucar.unidata.geoloc.Station> stationsBB= sod.getStations( bb2);
    assert null != stationsBB;
    assert stationsBB.size() <= stations.size();
    System.out.println(" bb2 stations = "+stationsBB.size());
View Full Code Here

  {
    // <CoverageOfferingBrief>/lonLatEnvelope
    Element lonLatEnvelopeElem = new Element( "lonLatEnvelope", wcsNS );
    lonLatEnvelopeElem.setAttribute( "srsName", "urn:ogc:def:crs:OGC:1.3:CRS84" );

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

    // <CoverageOfferingBrief>/lonLatEnvelope/gml:pos
    String firstPosition = llpt.getLongitude() + " " + llpt.getLatitude();
    double lon = llpt.getLongitude() + llbb.getWidth();
    String secondPosition = lon + " " + urpt.getLatitude();
// ToDo WCS 1.0Plus - Add vertical (Deal with conversion to meters. Yikes!!)
//    CoordinateAxis1D vertAxis = gcs.getVerticalAxis();
//    if ( vertAxis != null )
//    {
View Full Code Here

    String dsTitle = null;
    String dsDescrip = null;
    long dsStartDateLong = 994773600000l;
    long dsEndDateLong = 999086400000l;
    LatLonRect dsBoundBox = null;
    int dsNumGlobalAtts = 1;
    String exampleGlobalAttName = "history";
    String exampleGlobalAttVal = "FERRET V5.51    3-Jan-05";
    int dsNumVars = 2;
    String exampleVarName = "SALT";
View Full Code Here

      VariableSimpleIF v = (VariableSimpleIF) dataVars.get(i);
      assert null != pod.getDataVariable( v.getShortName());
    }

    // make a new bb
    LatLonRect bb = pod.getBoundingBox();
    assert null != bb;
    double h = bb.getUpperRightPoint().getLatitude() - bb.getLowerLeftPoint().getLatitude();
    LatLonRect bb2 = new LatLonRect(bb.getLowerLeftPoint(), bb.getWidth()/2, h/2);

    List data = pod.getData( bb2);
    testData( pod.getTimeUnits(), data.iterator());

    // make a new data range
View Full Code Here

    String dsTitle = null;
    String dsDescrip = null;
    long dsStartDateLong = 1020770640000l;
    long dsEndDateLong = 1020776540000l;
    LatLonRect dsBoundBox = null;
    int dsNumGlobalAtts = 27;
    String exampleGlobalAttName = "history";
    String exampleGlobalAttVal = "created by the Zebra DataStore library";
    int dsNumVars = 10;
    String exampleVarName = "tdry";
View Full Code Here

    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);

    return bb;
  }
View Full Code Here

TOP

Related Classes of ucar.unidata.geoloc.LatLonRect

Copyright © 2018 www.massapicom. 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.