Codota Logo
MSGnavigation
Code IndexAdd Codota to your IDE (free)

How to use
MSGnavigation
in
ucar.unidata.geoloc.projection.sat

Best Java code snippets using ucar.unidata.geoloc.projection.sat.MSGnavigation (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: edu.ucar/unidataCommon

/**
 * copy constructor - avoid clone !!
 */
@Override
public ProjectionImpl constructCopy() {
 return new MSGnavigation(lat0, lon0, 1000 * major_axis, 1000 * minor_axis, 1000 * sat_height, scale_x, scale_y);
}
origin: edu.ucar/cdm

maxR = .99 * this.major_axis * Math.sqrt((P - 1) / (P + 1));
addParameter(CF.GRID_MAPPING_NAME, "MSGnavigation");
addParameter(CF.LONGITUDE_OF_PROJECTION_ORIGIN, lon0);
addParameter(CF.LATITUDE_OF_PROJECTION_ORIGIN, lat0);
addParameter(CF.SEMI_MAJOR_AXIS, major_axis);
addParameter(CF.SEMI_MINOR_AXIS, minor_axis);
addParameter(HEIGHT_FROM_EARTH_CENTER, sat_height);
addParameter(SCALE_X, scale_x);
addParameter(SCALE_Y, scale_y);
origin: edu.ucar/cdm

@Override
public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint) {
 geocoord2pixcoord(latlon.getLatitude(), latlon.getLongitude(), destPoint);
 return destPoint;
}
origin: edu.ucar/netcdf

ProjectionPoint llpt = latLonToProj(rect.getLowerLeftPoint(), new ProjectionPointImpl());
ProjectionPoint urpt = latLonToProj(rect.getUpperRightPoint(), new ProjectionPointImpl());
ProjectionPoint lrpt = latLonToProj(rect.getLowerRightPoint(), new ProjectionPointImpl());
ProjectionPoint ulpt = latLonToProj(rect.getUpperLeftPoint(), new ProjectionPointImpl());
if (!addGoodPts(goodPts, llpt))
 countBad++;
if (!addGoodPts(goodPts, urpt))
 countBad++;
if (!addGoodPts(goodPts, lrpt))
 countBad++;
if (!addGoodPts(goodPts, ulpt))
 countBad++;
  addGoodPts(goodPts, new ProjectionPointImpl(0, maxR));
  addGoodPts(goodPts, new ProjectionPointImpl(maxR, 0));
  addGoodPts(goodPts, new ProjectionPointImpl(0, -maxR));
  addGoodPts(goodPts, new ProjectionPointImpl(-maxR, 0));
  addGoodPts(goodPts, new ProjectionPointImpl(xcoord, getLimitCoord(xcoord)));
  addGoodPts(goodPts, new ProjectionPointImpl(getLimitCoord(ycoord), ycoord));
 } else if (!ProjectionPointImpl.isInfinite(urpt)) {
  double xcoord = urpt.getX();
  addGoodPts(goodPts, new ProjectionPointImpl(xcoord, -getLimitCoord(xcoord)));
origin: Unidata/thredds

  @Test
  public void testConstructCopy() throws Exception {
    // These are the same as the values used in MSGnavigation() except for the 2nd, lon0. For the purposes of
    // this test, that's the only argument I care about.
    MSGnavigation msgNav =
        new MSGnavigation(0.0, 180, R_EQ, R_POL, SAT_HEIGHT, SAT_HEIGHT - R_EQ, SAT_HEIGHT - R_EQ);

    Assert.assertEquals(Math.PI, msgNav.getLon0(), 1e-6);  // 180° = π radians.

    // The 2 tests below failed prior to TDS-575 being fixed.

    MSGnavigation msgNavCopy1 = (MSGnavigation) msgNav.constructCopy();
    Assert.assertEquals(Math.PI, msgNavCopy1.getLon0(), 1e-6);  // 180° = π radians.

    MSGnavigation msgNavCopy2 = (MSGnavigation) msgNavCopy1.constructCopy();
    Assert.assertEquals(Math.PI, msgNavCopy2.getLon0(), 1e-6);  // 180° = π radians.
  }
}
origin: edu.ucar/cdm

@Override
public LatLonPoint projToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint) {
 pixcoord2geocoord(ppt.getX(), ppt.getY(), destPoint);
 return destPoint;
}
origin: edu.ucar/unidataCommon

ProjectionPoint llpt = latLonToProj(rect.getLowerLeftPoint(), new ProjectionPointImpl());
ProjectionPoint urpt = latLonToProj(rect.getUpperRightPoint(), new ProjectionPointImpl());
ProjectionPoint lrpt = latLonToProj(rect.getLowerRightPoint(), new ProjectionPointImpl());
ProjectionPoint ulpt = latLonToProj(rect.getUpperLeftPoint(), new ProjectionPointImpl());
if (!addGoodPts(goodPts, llpt))
 countBad++;
if (!addGoodPts(goodPts, urpt))
 countBad++;
if (!addGoodPts(goodPts, lrpt))
 countBad++;
if (!addGoodPts(goodPts, ulpt))
 countBad++;
  addGoodPts(goodPts, new ProjectionPointImpl(0, maxR));
  addGoodPts(goodPts, new ProjectionPointImpl(maxR, 0));
  addGoodPts(goodPts, new ProjectionPointImpl(0, -maxR));
  addGoodPts(goodPts, new ProjectionPointImpl(-maxR, 0));
  addGoodPts(goodPts, new ProjectionPointImpl(xcoord, getLimitCoord(xcoord)));
  addGoodPts(goodPts, new ProjectionPointImpl(getLimitCoord(ycoord), ycoord));
 } else if (!ProjectionPointImpl.isInfinite(urpt)) {
  double xcoord = urpt.getX();
  addGoodPts(goodPts, new ProjectionPointImpl(xcoord, -getLimitCoord(xcoord)));
origin: edu.ucar/unidataCommon

@Override
public LatLonPoint projToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint) {
 int status = pixcoord2geocoord(ppt.getX(), ppt.getY(), destPoint);
 return destPoint;
}
origin: edu.ucar/cdm

@Override
public ProjectionImpl constructCopy() {
 ProjectionImpl result =  new MSGnavigation(
     lat0, Math.toDegrees(lon0), 1000 * major_axis, 1000 * minor_axis, 1000 * sat_height, scale_x, scale_y);
 result.setDefaultMapArea(defaultMapArea);
 result.setName(name);
 return result;
}
origin: edu.ucar/netcdf

@Override
public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint) {
 int status = geocoord2pixcoord(latlon.getLatitude(), latlon.getLongitude(), destPoint);
 return destPoint;
}
origin: edu.ucar/netcdf

@Override
public LatLonPoint projToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint) {
 int status = pixcoord2geocoord(ppt.getX(), ppt.getY(), destPoint);
 return destPoint;
}
origin: Unidata/thredds

maxR = .99 * this.major_axis * Math.sqrt((P - 1) / (P + 1));
addParameter(CF.GRID_MAPPING_NAME, "MSGnavigation");
addParameter(CF.LONGITUDE_OF_PROJECTION_ORIGIN, lon0);
addParameter(CF.LATITUDE_OF_PROJECTION_ORIGIN, lat0);
addParameter(CF.SEMI_MAJOR_AXIS, major_axis);
addParameter(CF.SEMI_MINOR_AXIS, minor_axis);
addParameter(HEIGHT_FROM_EARTH_CENTER, sat_height);
addParameter(SCALE_X, scale_x);
addParameter(SCALE_Y, scale_y);
origin: Unidata/thredds

@Override
public ProjectionImpl constructCopy() {
 ProjectionImpl result =  new MSGnavigation(
     lat0, Math.toDegrees(lon0), 1000 * major_axis, 1000 * minor_axis, 1000 * sat_height, scale_x, scale_y);
 result.setDefaultMapArea(defaultMapArea);
 result.setName(name);
 return result;
}
origin: Unidata/thredds

@Override
public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint) {
 geocoord2pixcoord(latlon.getLatitude(), latlon.getLongitude(), destPoint);
 return destPoint;
}
origin: Unidata/thredds

@Override
public LatLonPoint projToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint) {
 pixcoord2geocoord(ppt.getX(), ppt.getY(), destPoint);
 return destPoint;
}
origin: edu.ucar/unidataCommon

maxR2 = maxR * maxR;
addParameter("grid_mapping_name", "MSGnavigation");
addParameter("longitude_of_projection_origin", new Double(lon0));
addParameter("latitude_of_projection_origin", new Double(lat0));
addParameter("semi_major_axis", new Double(major_axis));
addParameter("semi_minor_axis", new Double(minor_axis));
addParameter("height_from_earth_center", new Double(sat_height));
addParameter("scale_x", new Double(scale_x));
addParameter("scale_y", new Double(scale_y));
origin: edu.ucar/netcdf

@Override
public ProjectionImpl constructCopy() {
 ProjectionImpl result =  new MSGnavigation(lat0, lon0, 1000 * major_axis, 1000 * minor_axis, 1000 * sat_height, scale_x, scale_y);
 result.setDefaultMapArea(defaultMapArea);
 result.setName(name);
 return result;
}
origin: edu.ucar/unidataCommon

@Override
public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint) {
 int status = geocoord2pixcoord(latlon.getLatitude(), latlon.getLongitude(), destPoint);
 return destPoint;
}
origin: edu.ucar/netcdf

maxR2 = maxR * maxR;
addParameter(CF.GRID_MAPPING_NAME, "MSGnavigation");
addParameter(CF.LONGITUDE_OF_PROJECTION_ORIGIN, new Double(lon0));
addParameter(CF.LATITUDE_OF_PROJECTION_ORIGIN, new Double(lat0));
addParameter(CF.SEMI_MAJOR_AXIS, new Double(major_axis));
addParameter(CF.SEMI_MINOR_AXIS, new Double(minor_axis));
addParameter(HEIGHT_FROM_EARTH_CENTER, new Double(sat_height));
addParameter(SCALE_X, new Double(scale_x));
addParameter(SCALE_Y, new Double(scale_y));
origin: Unidata/thredds

@Test
public void testMSG() {
 doOne(new MSGnavigation(), 60, 60, true);
 testProjection(new MSGnavigation());
 MSGnavigation m = new MSGnavigation();
 showProjVal(m, 0, 0);
 showProjVal(m, 60, 0);
 showProjVal(m, -60, 0);
 showProjVal(m, 0, 60);
 showProjVal(m, 0, -60);
 }
ucar.unidata.geoloc.projection.satMSGnavigation

Javadoc

Port Eumetsat MSG_navigation.c to java. from http://www.eumetsat.int/idcplg?IdcService=GET_FILE&dDocName=zip_tools_msg_nav_c&RevisionSelectionMethod=LatestReleased

Most used methods

  • <init>
    Constructor
  • addParameter
  • geocoord2pixcoord
  • pixcoord2geocoord
  • addGoodPts
  • getLimitCoord
  • latLonToProj
  • makeRect
  • constructCopy
    copy constructor - avoid clone !!
  • getLon0

Popular in Java

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now