Class McIDASAreaProjection

    • Field Detail

      • ATTR_AREADIR

        public static String ATTR_AREADIR
        Attribute for the Area Directory
      • ATTR_NAVBLOCK

        public static String ATTR_NAVBLOCK
        Attribute for the Navigation Block
      • ATTR_AUXBLOCK

        public static String ATTR_AUXBLOCK
        Attribute for the Navigation Block
      • GRID_MAPPING_NAME

        public static String GRID_MAPPING_NAME
        Attribute for the Navigation Block
    • Constructor Detail

      • McIDASAreaProjection

        public McIDASAreaProjection()
        Default bean constructor
      • McIDASAreaProjection

        public McIDASAreaProjection​(ucar.mcidas.AreaFile af)
        create a McIDAS AREA projection from the Area file's directory and navigation blocks.

        This routine uses a flipped Y axis (first line of the image file is number 0)

        Parameters:
        af - is the associated AreaFile
      • McIDASAreaProjection

        public McIDASAreaProjection​(int[] dir,
                                    int[] nav,
                                    int[] aux)
        Create a AREA coordinate system from the Area file's directory and navigation blocks.

        This routine uses a flipped Y axis (first line of the image file is number 0)

        Parameters:
        dir - is the AREA file directory block
        nav - is the AREA file navigation block
        aux - is the AREA file auxillary block
    • Method Detail

      • getDirBlock

        public int[] getDirBlock()
        Get the directory block used to initialize this McIDASAreaProjection
        Returns:
        the area directory
      • getNavBlock

        public int[] getNavBlock()
        Get the navigation block used to initialize this McIDASAreaProjection
        Returns:
        the navigation block
      • getAuxBlock

        public int[] getAuxBlock()
        Get the auxilliary block used to initialize this McIDASAreaProjection
        Returns:
        the auxilliary block (may be null)
      • projToLatLon

        public LatLonPoint projToLatLon​(ProjectionPoint world,
                                        LatLonPointImpl result)
        Convert projection coordinates to a LatLonPoint Note: a new object is not created on each call for the return value.
        Specified by:
        projToLatLon in interface Projection
        Specified by:
        projToLatLon in class ProjectionImpl
        Parameters:
        world - convert from these projection coordinates
        result - the object to write to
        Returns:
        LatLonPoint convert to these lat/lon coordinates
      • latLonToProj

        public float[][] latLonToProj​(float[][] from,
                                      float[][] to,
                                      int latIndex,
                                      int lonIndex)
        Convert lat/lon coordinates to projection coordinates.
        Overrides:
        latLonToProj in class ProjectionImpl
        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, where to[0][i], to[1][i] is the (x,y) coordinate of the ith point
        latIndex - index of latitude in "from"
        lonIndex - index of longitude in "from"
        Returns:
        the "to" array.
      • projToLatLon

        public float[][] projToLatLon​(float[][] from,
                                      float[][] to)
        Convert lat/lon coordinates to projection coordinates.
        Overrides:
        projToLatLon in class ProjectionImpl
        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 double[][] latLonToProj​(double[][] from,
                                       double[][] to,
                                       int latIndex,
                                       int lonIndex)
        Convert lat/lon coordinates to projection coordinates.
        Overrides:
        latLonToProj in class ProjectionImpl
        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, where to[0][i], to[1][i] is the (x,y) coordinate of the ith point
        latIndex - index of latitude in "from"
        lonIndex - index of longitude in "from"
        Returns:
        the "to" array.
      • projToLatLon

        public double[][] projToLatLon​(double[][] from,
                                       double[][] to)
        Convert lat/lon coordinates to projection coordinates.
        Overrides:
        projToLatLon in class ProjectionImpl
        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
      • crossSeam

        public boolean crossSeam​(ProjectionPoint pt1,
                                 ProjectionPoint pt2)
        This returns true when the line between pt1 and pt2 crosses the seam. When the cone is flattened, the "seam" is lon0 +- 180.
        Specified by:
        crossSeam in interface Projection
        Specified by:
        crossSeam in class ProjectionImpl
        Parameters:
        pt1 - point 1
        pt2 - point 2
        Returns:
        true when the line between pt1 and pt2 crosses the seam.
      • equals

        public boolean equals​(Object o)
        Description copied from class: ProjectionImpl
        Returns true if this represents the same Projection as proj.
        Specified by:
        equals in interface Projection
        Specified by:
        equals in class ProjectionImpl
        Parameters:
        o - projection in question
        Returns:
        true if this represents the same Projection as proj.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Return a String which tells some info about this navigation
        Overrides:
        toString in class ProjectionImpl
        Returns:
        wordy String