Tabnine Logo
GridCoordSys.getLatLon
Code IndexAdd Tabnine to your IDE (free)

How to use
getLatLon
method
in
ucar.nc2.dt.grid.GridCoordSys

Best Java code snippets using ucar.nc2.dt.grid.GridCoordSys.getLatLon (Showing top 3 results out of 315)

origin: Unidata/thredds

/**
 * Get the Lat/Lon coordinates of the midpoint of a grid cell, using the x,y indices
 *
 * @param xindex x index
 * @param yindex y index
 * @return lat/lon coordinate of the midpoint of the cell
 */
@Override
public LatLonPoint getLatLon(int xindex, int yindex) {
 double x, y;
 if (horizXaxis instanceof CoordinateAxis1D) {
  CoordinateAxis1D horiz1D = (CoordinateAxis1D) horizXaxis;
  x = horiz1D.getCoordValue(xindex);
 } else {
  CoordinateAxis2D horiz2D = (CoordinateAxis2D) horizXaxis;
  x = horiz2D.getCoordValue( yindex, xindex);
 }
 if (horizYaxis instanceof CoordinateAxis1D) {
  CoordinateAxis1D horiz1D = (CoordinateAxis1D) horizYaxis;
  y = horiz1D.getCoordValue(yindex);
 } else {
  CoordinateAxis2D horiz2D = (CoordinateAxis2D) horizYaxis;
  y = horiz2D.getCoordValue( yindex, xindex);
 }
 return isLatLon() ? new LatLonPointImpl(y, x) : getLatLon(x, y);
}
origin: edu.ucar/netcdf

/**
 * Get the Lat/Lon coordinates of the midpoint of a grid cell, using the x,y indices
 *
 * @param xindex x index
 * @param yindex y index
 * @return lat/lon coordinate of the midpoint of the cell
 */
@Override
public LatLonPoint getLatLon(int xindex, int yindex) {
 double x, y;
 if (horizXaxis instanceof CoordinateAxis1D) {
  CoordinateAxis1D horiz1D = (CoordinateAxis1D) horizXaxis;
  x = horiz1D.getCoordValue(xindex);
 } else {
  CoordinateAxis2D horiz2D = (CoordinateAxis2D) horizXaxis;
  x = horiz2D.getCoordValue( yindex, xindex);
 }
 if (horizYaxis instanceof CoordinateAxis1D) {
  CoordinateAxis1D horiz1D = (CoordinateAxis1D) horizYaxis;
  y = horiz1D.getCoordValue(yindex);
 } else {
  CoordinateAxis2D horiz2D = (CoordinateAxis2D) horizYaxis;
  y = horiz2D.getCoordValue( yindex, xindex);
 }
 return isLatLon() ? new LatLonPointImpl(y, x) : getLatLon(x, y);
}
origin: edu.ucar/cdm

/**
 * Get the Lat/Lon coordinates of the midpoint of a grid cell, using the x,y indices
 *
 * @param xindex x index
 * @param yindex y index
 * @return lat/lon coordinate of the midpoint of the cell
 */
@Override
public LatLonPoint getLatLon(int xindex, int yindex) {
 double x, y;
 if (horizXaxis instanceof CoordinateAxis1D) {
  CoordinateAxis1D horiz1D = (CoordinateAxis1D) horizXaxis;
  x = horiz1D.getCoordValue(xindex);
 } else {
  CoordinateAxis2D horiz2D = (CoordinateAxis2D) horizXaxis;
  x = horiz2D.getCoordValue( yindex, xindex);
 }
 if (horizYaxis instanceof CoordinateAxis1D) {
  CoordinateAxis1D horiz1D = (CoordinateAxis1D) horizYaxis;
  y = horiz1D.getCoordValue(yindex);
 } else {
  CoordinateAxis2D horiz2D = (CoordinateAxis2D) horizYaxis;
  y = horiz2D.getCoordValue( yindex, xindex);
 }
 return isLatLon() ? new LatLonPointImpl(y, x) : getLatLon(x, y);
}
ucar.nc2.dt.gridGridCoordSysgetLatLon

Javadoc

Get the Lat/Lon coordinates of the midpoint of a grid cell, using the x,y indices

Popular methods of GridCoordSys

  • hasVerticalAxis
  • <init>
    Create a GridCoordSys as a section of an existing GridCoordSys. This will create sections of the cor
  • convertUnits
  • findXYindexFromCoord
    Given a point in x,y coordinate space, find the x,y index in the coordinate system.
  • findXYindexFromCoordBounded
    Given a point in x,y coordinate space, find the x,y index in the coordinate system. If outside the r
  • getBoundingBox
    Get the x,y bounding box in projection coordinates.
  • getCalendarDates
  • getCoordinateTransforms
  • getEnsembleAxis
    get the Ensemble axis, else null
  • getHorizStaggerType
  • getLatLonBoundingBox
  • getLevels
    Get the list of level names, to be used for user selection. The ith one refers to the ith level coor
  • getLatLonBoundingBox,
  • getLevels,
  • getMinOrMaxLon,
  • getName,
  • getProjection,
  • getRangesFromLatLonRect,
  • getRunTimeAxis,
  • getTimeAxis,
  • getTimeAxis1D

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JList (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Github Copilot alternatives
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