congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MSGnavigation
Code IndexAdd Tabnine 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)

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

  • Making http post requests using okhttp
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Join (org.hibernate.mapping)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now