Class Projections


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

      Constructors 
      Constructor Description
      Projections()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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.
    • Constructor Detail

      • Projections

        public Projections()
    • Method Detail

      • 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