Codota Logo
CoordinateSystem.getCoordinateAxes
Code IndexAdd Codota to your IDE (free)

How to use
getCoordinateAxes
method
in
ucar.nc2.dataset.CoordinateSystem

Best Java code snippets using ucar.nc2.dataset.CoordinateSystem.getCoordinateAxes (Showing top 20 results out of 315)

  • Common ways to obtain CoordinateSystem
private void myMethod () {
CoordinateSystem c =
  • Codota IconNetcdfDataset netcdfDataset;String name;netcdfDataset.findCoordinateSystem(name)
  • Codota IconNetcdfDataset ds;Collection axes;new CoordinateSystem(ds, axes, null)
  • Codota IconList list;(CoordinateSystem) list.get(location)
  • Smart code suggestions by Codota
}
origin: geotools/geotools

  @Override
  public List<CoordinateAxis> getCoordinateAxes() {
    return cs.getCoordinateAxes();
  }
}
origin: geotools/geotools

List<CoordinateAxis> axesSorted = new ArrayList<>(coordinateSystem.getCoordinateAxes());
Collections.sort(axesSorted, AXIS_COMPARATOR);
for (CoordinateAxis axis : axesSorted) {
origin: geotools/geotools

String elevationAttribute = "";
String otherAttributes = "";
for (CoordinateAxis axis : cs.getCoordinateAxes()) {
origin: org.geotools/gt-unidata

  @Override
  public List<CoordinateAxis> getCoordinateAxes() {
    return cs.getCoordinateAxes();
  }
}
origin: opengeospatial/geoapi

/**
 * Creates a new {@code NetcdfCRS} object wrapping the given netCDF coordinate system.
 * The {@link CoordinateSystem#getCoordinateAxes()} is invoked at construction time and
 * every elements are assumed instances of {@link CoordinateAxis1D}.
 *
 * @param  netcdfCS  the netCDF coordinate system to wrap.
 * @throws ClassCastException if at least one axis is not an instance of the
 *         {@link CoordinateAxis1D} subclass.
 */
protected NetcdfCRS(final CoordinateSystem netcdfCS) throws ClassCastException {
  this(netcdfCS, netcdfCS.getCoordinateAxes());
}
origin: org.geotools/gt-netcdf

  @Override
  public List<CoordinateAxis> getCoordinateAxes() {
    return cs.getCoordinateAxes();
  }
}
origin: edu.ucar/netcdf

 public int compare(CoordinateSystem o1, CoordinateSystem o2) {
  return o2.getCoordinateAxes().size() - o1.getCoordinateAxes().size();
 }
});
origin: edu.ucar/netcdf

 public int compare(CoordinateSystem o1, CoordinateSystem o2) {
  return o2.getCoordinateAxes().size() - o1.getCoordinateAxes().size() ;
 }
});
origin: edu.ucar/cdm

 public int compare(CoordinateSystem o1, CoordinateSystem o2) {
  return o2.getCoordinateAxes().size() - o1.getCoordinateAxes().size() ;
 }
});
origin: edu.ucar/cdm

 public int compare(CoordinateSystem o1, CoordinateSystem o2) {
  return o2.getCoordinateAxes().size() - o1.getCoordinateAxes().size();
 }
});
origin: Unidata/thredds

/**
 * Find the CoordinateSystem with the most number of CoordinateAxes
 * @param ds search in this dataset
 * @return CoordinateSystem or null if none
 */
static private CoordinateSystem findBestCoordinateSystem(NetcdfDataset ds) {
   // find coordinate system with highest rank (largest number of axes)
 CoordinateSystem use = null;
 for (CoordinateSystem cs : ds.getCoordinateSystems()) {
  if (use == null) use = cs;
  else if (cs.getCoordinateAxes().size() > use.getCoordinateAxes().size())
   use = cs;
 }
 return use;
}
origin: edu.ucar/netcdf

public void setCoordMap(java.util.List<CoordinateSystem> csysList) {
 CoordinateSystem use = null;
 for (CoordinateSystem csys : csysList) {
  if (use == null) use = csys;
  else if (csys.getCoordinateAxes().size() > use.getCoordinateAxes().size())
   use = csys;
 }
 coordMap = (use == null) ? "" : "f:D(" + use.getRankDomain() + ")->R(" + use.getRankRange() + ")";
}
origin: edu.ucar/cdm

public void setCoordMap(java.util.List<CoordinateSystem> csysList) {
 CoordinateSystem use = null;
 for (CoordinateSystem csys : csysList) {
  if (use == null) use = csys;
  else if (csys.getCoordinateAxes().size() > use.getCoordinateAxes().size())
   use = csys;
 }
 coordMap = (use == null) ? "" : "f:D(" + use.getRankDomain() + ")->R(" + use.getRankRange() + ")";
}
origin: edu.ucar/cdm

/** Override Object.hashCode() to implement equals. */
public int hashCode() {
 if (hashCode == 0) {
  int result = 17;
  result = 37*result + getName().hashCode();
  result = 37*result + getCoordinateAxes().hashCode();
  result = 37*result + getCoordinateTransforms().hashCode();
  hashCode = result;
 }
 return hashCode;
}
private volatile int hashCode = 0;
origin: Unidata/thredds

/** Override Object.hashCode() to implement equals. */
public int hashCode() {
 if (hashCode == 0) {
  int result = 17;
  result = 37*result + getName().hashCode();
  result = 37*result + getCoordinateAxes().hashCode();
  result = 37*result + getCoordinateTransforms().hashCode();
  hashCode = result;
 }
 return hashCode;
}
private volatile int hashCode = 0;
origin: edu.ucar/netcdf

/** Override Object.hashCode() to implement equals. */
public int hashCode() {
 if (hashCode == 0) {
  int result = 17;
  result = 37*result + getName().hashCode();
  result = 37*result + getCoordinateAxes().hashCode();
  result = 37*result + getCoordinateTransforms().hashCode();
  hashCode = result;
 }
 return hashCode;
}
private volatile int hashCode = 0;
origin: edu.ucar/cdm

private boolean compareCoordinateSystem(CoordinateSystem cs1, CoordinateSystem cs2,  ObjFilter filter) {
 if (showCompare)
  f.format("compare CoordinateSystem '%s' to '%s' %n", cs1.getName(), cs2.getName());
 List matchAxes = new ArrayList();
 boolean ok = checkAll(cs1.getName(), cs1.getCoordinateAxes(), cs2.getCoordinateAxes(), matchAxes);
 for (int i = 0; i < matchAxes.size(); i += 2) {
  CoordinateAxis orgCs = (CoordinateAxis) matchAxes.get(i);
  CoordinateAxis copyCs = (CoordinateAxis) matchAxes.get(i + 1);
  ok &= compareCoordinateAxis(orgCs, copyCs, filter);
 }
 List matchTransforms = new ArrayList();
 ok &= checkAll(cs1.getName(), cs1.getCoordinateTransforms(), cs2.getCoordinateTransforms(), matchTransforms);
 return ok;
}
origin: Unidata/thredds

private boolean compareCoordinateSystem(CoordinateSystem cs1, CoordinateSystem cs2, ObjFilter filter) {
 if (showCompare)
  f.format("compare CoordinateSystem '%s' to '%s' %n", cs1.getName(), cs2.getName());
 List matchAxes = new ArrayList();
 boolean ok = checkAll(cs1.getName(), cs1.getCoordinateAxes(), cs2.getCoordinateAxes(), matchAxes);
 for (int i = 0; i < matchAxes.size(); i += 2) {
  CoordinateAxis orgCs = (CoordinateAxis) matchAxes.get(i);
  CoordinateAxis copyCs = (CoordinateAxis) matchAxes.get(i + 1);
  ok &= compareCoordinateAxis(orgCs, copyCs, filter);
 }
 List matchTransforms = new ArrayList();
 ok &= checkAll(cs1.getName(), cs1.getCoordinateTransforms(), cs2.getCoordinateTransforms(), matchTransforms);
 return ok;
}
origin: edu.ucar/netcdf

/**
 * Look for Axis by Type, assign to TableConfig if found.
 * Looks for Lat, Lon, Time, Height.
 * @param nt assign coordinates to this table.
 * @param ds look in this dataset's "Best" coordinate system. If no CoordSystem, try list of coordinate axes
 */
static public void findCoords(TableConfig nt, NetcdfDataset ds) {
 CoordinateSystem use = findBestCoordinateSystem(ds);
 if (use == null)
  findCoords(nt, ds.getCoordinateAxes());
 else
  findCoords(nt, use.getCoordinateAxes());
}
origin: Unidata/thredds

private CoordinateSystem findReplacementCs(CoordinateSystem protoCs, String timeDim, NetcdfDataset result) {
 CoordinateSystem replace = result.findCoordinateSystem(protoCs.getName());
 if (replace != null) return replace;
 List<CoordinateAxis> axes = new ArrayList<>();
 for (CoordinateAxis axis : protoCs.getCoordinateAxes()) {
  CoordinateAxis ra = result.findCoordinateAxis(axis.getFullNameEscaped());
  axes.add(ra);
 }
 // coord transforms are immutable and can be shared
 CoordinateSystem cs = new CoordinateSystem(result, axes, protoCs.getCoordinateTransforms());
 result.addCoordinateSystem(cs);
 return cs;
}
ucar.nc2.datasetCoordinateSystemgetCoordinateAxes

Javadoc

get the List of CoordinateAxis objects

Popular methods of CoordinateSystem

  • containsAxis
    Do we have the named axis?
  • getLatAxis
    get the CoordinateAxis with AxisType.Lat, or null if none. if more than one, choose one with smalles
  • getName
    get the name of the Coordinate System
  • getTaxis
    get the CoordinateAxis with AxisType.Time, or null if none. if more than one, choose one with smalle
  • getCoordinateTransforms
    get the List of CoordinateTransform objects
  • getProjection
    Get the Projection for this coordinate system. If isLatLon(), then returns a LatLonProjection. Other
  • getRankDomain
    Get the domain rank of the coordinate system = number of dimensions it is a function of.
  • getRankRange
    Get the range rank of the coordinate system = number of coordinate axes.
  • getYaxis
    get the CoordinateAxis with AxisType.GeoY, or null if none. if more than one, choose one with smalle
  • isGeoXY
    true if it has X and Y CoordinateAxis, and a CoordTransform Projection
  • isLatLon
    true if it has Lat and Lon CoordinateAxis
  • makeDomain
  • isLatLon,
  • makeDomain,
  • <init>,
  • addCoordinateTransform,
  • containsAxes,
  • containsAxisType,
  • containsAxisTypes,
  • findAxis,
  • getAzimuthAxis

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • Menu (java.awt)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Runner (org.openjdk.jmh.runner)
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