Class Projections

java.lang.Object
ucar.unidata.geoloc.Projections

public class Projections extends Object
Static utilities for Projection.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double[][]
    latLonToProj(Projection proj, double[][] from)
    Convert lat/lon coordinates to projection coordinates.
    static double[][]
    latLonToProj(Projection proj, double[][] from, double[][] to)
    Convert lat/lon coordinates to projection coordinates.
    static double[][]
    latLonToProj(Projection proj, double[][] from, double[][] to, int latIndex, int lonIndex)
    Convert lat/lon coordinates to projection coordinates.
    static double[][]
    latLonToProj(Projection proj, double[][] from, int latIndex, int lonIndex)
    Convert lat/lon coordinates to projection coordinates.
    static float[][]
    latLonToProj(Projection proj, float[][] from)
    Convert lat/lon coordinates to projection coordinates.
    static float[][]
    latLonToProj(Projection proj, float[][] from, float[][] to)
    Convert lat/lon coordinates to projection coordinates.
    static float[][]
    latLonToProj(Projection proj, float[][] from, float[][] to, int latIndex, int lonIndex)
    Convert lat/lon coordinates to projection coordinates.
    static float[][]
    latLonToProj(Projection proj, float[][] from, int latIndex, int lonIndex)
    Convert lat/lon coordinates to projection coordinates.
    static double[][]
    projToLatLon(Projection proj, double[][] from)
    Convert projection coordinates to lat/lon coordinates.
    static double[][]
    projToLatLon(Projection proj, double[][] from, double[][] to)
    Convert projection coordinates to lat/lon coordinate.
    static float[][]
    projToLatLon(Projection proj, float[][] from)
    Convert projection coordinates to lat/lon coordinates.
    static float[][]
    projToLatLon(Projection proj, float[][] from, float[][] to)
    Convert projection coordinates to lat/lon coordinate.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Projections

      public Projections()
  • Method Details

    • projToLatLon

      public static double[][] projToLatLon(Projection proj, double[][] from)
      Convert projection coordinates to lat/lon coordinates.
      Parameters:
      from - array of projection coordinates: from[2][n], where from[0][i], from[1][i] is the x, y coordinate of the ith point
      Returns:
      resulting array of lat/lon coordinates, where to[0][i], to[1][i] is the lat,lon coordinate of the ith point
    • projToLatLon

      public static double[][] projToLatLon(Projection proj, double[][] from, double[][] to)
      Convert projection coordinates to lat/lon coordinate.
      Parameters:
      from - array of projection coordinates: from[2][n], where (from[0][i], from[1][i]) is the (x, y) coordinate of the ith point
      to - resulting array of lat/lon coordinates: to[2][n] where (to[0][i], to[1][i]) is the (lat, lon) coordinate of the ith point
      Returns:
      the "to" array
    • projToLatLon

      public static float[][] projToLatLon(Projection proj, float[][] from)
      Convert projection coordinates to lat/lon coordinates.
      Parameters:
      from - array of projection coordinates: from[2][n], where from[0][i], from[1][i] is the x, y coordinate of the ith point
      Returns:
      resulting array of lat/lon coordinates, where to[0][i], to[1][i] is the lat,lon coordinate of the ith point
    • projToLatLon

      public static float[][] projToLatLon(Projection proj, float[][] from, float[][] to)
      Convert projection coordinates to lat/lon coordinate.
      Parameters:
      from - array of projection coordinates: from[2][n], where (from[0][i], from[1][i]) is the (x, y) coordinate of the ith point
      to - resulting array of lat/lon coordinates: to[2][n] where (to[0][i], to[1][i]) is the (lat, lon) coordinate of the ith point
      Returns:
      the "to" array
    • latLonToProj

      public static double[][] latLonToProj(Projection proj, double[][] from)
      Convert lat/lon coordinates to projection coordinates.
      Parameters:
      from - array of lat/lon coordinates: from[2][n], where from[0][i], from[1][i] is the (lat,lon) coordinate of the ith point
      Returns:
      resulting array of projection coordinates, where to[0][i], to[1][i] is the (x,y) coordinate of the ith point
    • latLonToProj

      public static double[][] latLonToProj(Projection proj, double[][] from, double[][] to)
      Convert lat/lon coordinates to projection coordinates.
      Parameters:
      from - array of lat/lon coordinates: from[2][n], where (from[0][i], from[1][i]) is the (lat,lon) coordinate of the ith point
      to - resulting array of projection coordinates: to[2][n] where (to[0][i], to[1][i]) is the (x,y) coordinate of the ith point
      Returns:
      the "to" array
    • latLonToProj

      public static double[][] latLonToProj(Projection proj, double[][] from, int latIndex, int lonIndex)
      Convert lat/lon coordinates to projection coordinates.
      Parameters:
      from - array of lat/lon coordinates: from[2][n], where (from[latIndex][i], from[lonIndex][i]) is the (lat,lon) coordinate of the ith point
      latIndex - index of lat coordinate; must be 0 or 1
      lonIndex - index of lon coordinate; must be 0 or 1
      Returns:
      resulting array of projection coordinates: to[2][n] where (to[0][i], to[1][i]) is the (x,y) coordinate of the ith point
    • latLonToProj

      public static double[][] latLonToProj(Projection proj, double[][] from, double[][] to, int latIndex, int lonIndex)
      Convert lat/lon coordinates to projection coordinates.
      Parameters:
      from - array of lat/lon coordinates: from[2][n], where (from[latIndex][i], from[lonIndex][i]) is the (lat,lon) coordinate of the ith point
      to - resulting array of projection coordinates: to[2][n] where (to[0][i], to[1][i]) is the (x,y) coordinate of the ith point
      latIndex - index of lat coordinate; must be 0 or 1
      lonIndex - index of lon coordinate; must be 0 or 1
      Returns:
      the "to" array
    • latLonToProj

      public static float[][] latLonToProj(Projection proj, float[][] from)
      Convert lat/lon coordinates to projection coordinates.
      Parameters:
      from - array of lat/lon coordinates: from[2][n], where from[0][i], from[1][i] is the (lat,lon) coordinate of the ith point
      Returns:
      resulting array of projection coordinates, where to[0][i], to[1][i] is the (x,y) coordinate of the ith point
    • latLonToProj

      public static float[][] latLonToProj(Projection proj, float[][] from, float[][] to)
      Convert lat/lon coordinates to projection coordinates.
      Parameters:
      from - array of lat/lon coordinates: from[2][n], where (from[0][i], from[1][i]) is the (lat,lon) coordinate of the ith point
      to - resulting array of projection coordinates: to[2][n] where (to[0][i], to[1][i]) is the (x,y) coordinate of the ith point
      Returns:
      the "to" array
    • latLonToProj

      public static float[][] latLonToProj(Projection proj, float[][] from, int latIndex, int lonIndex)
      Convert lat/lon coordinates to projection coordinates.
      Parameters:
      from - array of lat/lon coordinates: from[2][n], where (from[latIndex][i], from[lonIndex][i]) is the (lat,lon) coordinate of the ith point
      latIndex - index of lat coordinate; must be 0 or 1
      lonIndex - index of lon coordinate; must be 0 or 1
      Returns:
      resulting array of projection coordinates: to[2][n] where (to[0][i], to[1][i]) is the (x,y) coordinate of the ith point
    • latLonToProj

      public static float[][] latLonToProj(Projection proj, float[][] from, float[][] to, int latIndex, int lonIndex)
      Convert lat/lon coordinates to projection coordinates.
      Parameters:
      from - array of lat/lon coordinates: from[2][n], where (from[latIndex][i], from[lonIndex][i]) is the (lat,lon) coordinate of the ith point
      to - resulting array of projection coordinates: to[2][n] where (to[0][i], to[1][i]) is the (x,y) coordinate of the ith point
      latIndex - index of lat coordinate; must be 0 or 1
      lonIndex - index of lon coordinate; must be 0 or 1
      Returns:
      the "to" array