Examples of LatLonPointImpl


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

    }

    CoordinateAxis1D xaxis = (CoordinateAxis1D) gsys.getXHorizAxis();
    CoordinateAxis1D yaxis =  (CoordinateAxis1D) gsys.getYHorizAxis();
    p.projToLatLon(xaxis.getCoordValue(0), yaxis.getCoordValue(0)  );
    LatLonPointImpl start1 =  p.projToLatLon(xaxis.getCoordValue(0), yaxis.getCoordValue(0));
    LatLonPointImpl start2 =  p.projToLatLon(xaxis.getCoordValue((int)xaxis.getSize()-1), yaxis.getCoordValue((int)yaxis.getSize()-1));
    System.out.printf( "start = %f %f%n", start1.getLatitude(), start1.getLongitude());
    System.out.printf( "end = %f %f%n", start2.getLatitude(), start2.getLongitude());
   
    /*
    wgrib2 /data/laps/lapsprd/gr2/102711000.gr2 -ijlat 358 353 -d 1
      1:0:(358,353),lon=270.784605,lat=41.527360,val=216.094

    wgrib2 /data/laps/lapsprd/gr2/102711000.gr2 -grid -d 11:0:grid_template=20:
      polar stereographic grid: (358 x 353) input WE|EW:SN output WE:SN res 8
      North pole lat1 26.023346 lon1 251.023136 latD 34.183360 lonV 259.280944 dx 5000.000000 m dy 5000.000000 m
     */

    assert TestAll.closeEnough(start1.getLatitude(), 26.023346) : TestAll.howClose(start1.getLatitude(), 26.023346);
    assert TestAll.closeEnough(start1.getLongitude(), 251.023136 - 360.0) : TestAll.howClose(start1.getLongitude(), 251.023136- 360.0);

    assert TestAll.closeEnough(start2.getLatitude(), 41.5273602.0E-4) :  TestAll.howClose(start2.getLatitude(), 41.527360);
    assert TestAll.closeEnough(start2.getLongitude(), 270.784605 - 360.0, 2.0E-4) : TestAll.howClose(start2.getLongitude(), 270.784605- 360.0);

    ncd.close();
  }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

    if ((d1 != null) && (d2 != null))
      assert d1.before(d2) || d1.equals( d2);

    ucar.unidata.geoloc.EarthLocation eloc = rds.getCommonOrigin();
    assert eloc != null;
    LatLonPoint llp = new LatLonPointImpl( eloc.getLatitude(), eloc.getLongitude());

    LatLonRect bb = rds.getBoundingBox();
    assert bb.contains(llp);

    List rvars = rds.getDataVariables();
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

      hashCode = 0;
    }

    public LatLonRect getBoundingBox() {
      return isGlobal ? new LatLonRect() :
          new LatLonRect(new LatLonPointImpl(getLatStart(), getLonStart()), getLatExtent(), getLonExtent());
    }
View Full Code Here

Examples of ucar.unidata.geoloc.LatLonPointImpl

      return isGlobal ? new LatLonRect() :
          new LatLonRect(new LatLonPointImpl(getLatStart(), getLonStart()), getLatExtent(), getLonExtent());
    }

    public void setBoundingBox(LatLonRect bb) {
      LatLonPointImpl llpt = bb.getLowerLeftPoint();
      LatLonPointImpl urpt = bb.getUpperRightPoint();
      double height = urpt.getLatitude() - llpt.getLatitude();

      this.eastwest = new Range(llpt.getLongitude(), bb.getWidth(), 0.0, "degrees_east");
      this.northsouth = new Range(llpt.getLatitude(), height, 0.0, "degrees_north");
    }
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.