Class ProjectionImpl

    • Field Detail

      • EARTH_RADIUS

        public static final double EARTH_RADIUS
        Deprecated.
        not public.
        See Also:
        Constant Field Values
      • TOLERANCE

        protected static final double TOLERANCE
        Deprecated.
        not public.
        See Also:
        Constant Field Values
      • PI_OVER_2

        public static final double PI_OVER_2
        Deprecated.
        use Math.PI/2
        See Also:
        Constant Field Values
      • PI_OVER_4

        public static final double PI_OVER_4
        Deprecated.
        use Math.PI/4
        See Also:
        Constant Field Values
      • name

        protected String name
        Deprecated.
        name of this projection.
      • defaultUnits

        protected String defaultUnits
        Deprecated.
        name of the default units for this projection
      • isLatLon

        protected final boolean isLatLon
        Deprecated.
        flag for latlon
      • atts

        protected final List<Parameter> atts
        Deprecated.
        list of attributes
      • defaultMapArea

        protected ProjectionRect defaultMapArea
        Deprecated.
        default map area
    • Constructor Detail

      • ProjectionImpl

        protected ProjectionImpl​(String name,
                                 String defaultUnits,
                                 boolean isLatLon)
        Deprecated.
      • ProjectionImpl

        protected ProjectionImpl​(String name,
                                 boolean isLatLon)
        Deprecated.
    • Method Detail

      • constructCopy

        public abstract ProjectionImpl constructCopy()
        Deprecated.
        copy constructor - avoid clone !!
        Returns:
        a copy of this Projection. TODO return Projection in ver6
      • getClassName

        public String getClassName()
        Deprecated.
        Get the name of the type of the projection.
        Specified by:
        getClassName in interface Projection
        Returns:
        the class name
      • paramsToString

        public abstract String paramsToString()
        Deprecated.
        Get a string representation of the projection parameters
        Specified by:
        paramsToString in interface Projection
        Returns:
        string representation of the projection parameters
      • getProjectionTypeLabel

        public String getProjectionTypeLabel()
        Deprecated.
        Get the label to be used in the gui for this type of projection. This defaults to call getClassName
        Returns:
        Type label
      • latLonToProj

        @Deprecated
        public abstract ProjectionPoint latLonToProj​(LatLonPoint latlon,
                                                     ProjectionPointImpl destPoint)
        Deprecated.
        use latLonToProj(LatLonPoint latLon)
        Convert a LatLonPoint to projection coordinates
        Specified by:
        latLonToProj in interface Projection
        Parameters:
        latlon - convert from these lat, lon coordinates
        destPoint - the object to write to
        Returns:
        the given destPoint
      • latLonToProj

        public ProjectionPoint latLonToProj​(LatLonPoint latLon)
        Deprecated.
        Convert a LatLonPoint to projection coordinates Note: a new object is now created on each call for the return value, as of 4.0.46
        Specified by:
        latLonToProj in interface Projection
        Parameters:
        latLon - convert from these lat, lon coordinates
        Returns:
        ProjectionPoint convert to these projection coordinates
      • projToLatLon

        @Deprecated
        public abstract LatLonPoint projToLatLon​(ProjectionPoint ppt,
                                                 LatLonPointImpl destPoint)
        Deprecated.
        use projToLatLon(ProjectionPoint ppt)
        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
        Parameters:
        ppt - convert from these projection coordinates
        destPoint - the object to write to
        Returns:
        LatLonPoint convert to these lat/lon coordinates
      • projToLatLon

        public LatLonPoint projToLatLon​(ProjectionPoint ppt)
        Deprecated.
        Convert projection coordinates to a LatLonPoint Note: a new object is now created on each call for the return value, as of 4.0.46
        Specified by:
        projToLatLon in interface Projection
        Parameters:
        ppt - convert from these projection coordinates
        Returns:
        LatLonPoint convert to these lat/lon coordinates
      • crossSeam

        public abstract boolean crossSeam​(ProjectionPoint pt1,
                                          ProjectionPoint pt2)
        Deprecated.
        Does the line between these two points cross the projection "seam".
        Specified by:
        crossSeam in interface Projection
        Parameters:
        pt1 - the line goes between these two points
        pt2 - the line goes between these two points
        Returns:
        false if there is no seam
      • equals

        public abstract boolean equals​(Object proj)
        Deprecated.
        Returns true if this represents the same Projection as proj.
        Specified by:
        equals in interface Projection
        Overrides:
        equals in class Object
        Parameters:
        proj - projection in question
        Returns:
        true if this represents the same Projection as proj.
      • getName

        public String getName()
        Deprecated.
        Get the name of this specific projection (also see getClassName)
        Specified by:
        getName in interface Projection
        Returns:
        name of the projection
      • getDefaultUnits

        public String getDefaultUnits()
        Deprecated.
        Get the name of the default units for this projection
        Returns:
        the name of the default units
      • getProjectionParameters

        public List<Parameter> getProjectionParameters()
        Deprecated.
        Get parameters as list of ucar.unidata.util.Parameter
        Specified by:
        getProjectionParameters in interface Projection
        Returns:
        List of parameters
      • addParameter

        protected void addParameter​(String name,
                                    String value)
        Deprecated.
        Add an attribute to this projection
        Parameters:
        name - name of the attribute
        value - attribute value as a string
      • addParameter

        protected void addParameter​(String name,
                                    double value)
        Deprecated.
        Add an attribute to this projection
        Parameters:
        name - name of the attribute
        value - attribute value as a double
      • addParameter

        protected void addParameter​(Parameter p)
        Deprecated.
        Add an attribute to this projection
        Parameters:
        p - specify as a Parameter
      • isLatLon

        public boolean isLatLon()
        Deprecated.
        Is this the lat/lon Projection ?
        Specified by:
        isLatLon in interface Projection
        Returns:
        true if it is the lat/lon Projection
      • getHeader

        public static String getHeader()
        Deprecated.
        Get a header for display.
        Returns:
        human readable header for display
      • toString

        public String toString()
        Deprecated.
        Get a String representation of this projection.
        Overrides:
        toString in class Object
        Returns:
        the name of the projection. This is what gets displayed when you add the projection object to a UI widget (e.g. label, combobox)
      • getDefaultMapArea

        public ProjectionRect getDefaultMapArea()
        Deprecated.
        Get a reasonable bounding box for this projection.
        Specified by:
        getDefaultMapArea in interface Projection
        Returns:
        reasonable bounding box
      • getDefaultMapAreaLL

        public LatLonRect getDefaultMapAreaLL()
        Deprecated.
        Get the bounding box in lat/lon.
        Returns:
        the LatLonRectangle for the bounding box
      • setDefaultMapArea

        @Deprecated
        public void setDefaultMapArea​(ProjectionRect bb)
        Deprecated.
        use builder
        Set a reasonable bounding box for this specific projection. Projections are typically specific to an area of the world; theres no bounding box that works for all projections.
        Parameters:
        bb - bounding box
      • projToLatLon

        @Deprecated
        public double[][] projToLatLon​(double[][] from)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public double[][] projToLatLon​(double[][] from,
                                       double[][] to)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public float[][] projToLatLon​(float[][] from)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public float[][] projToLatLon​(float[][] from,
                                      float[][] to)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public double[][] latLonToProj​(double[][] from)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public double[][] latLonToProj​(double[][] from,
                                       double[][] to)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public double[][] latLonToProj​(double[][] from,
                                       int latIndex,
                                       int lonIndex)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public double[][] latLonToProj​(double[][] from,
                                       double[][] to,
                                       int latIndex,
                                       int lonIndex)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public float[][] latLonToProj​(float[][] from)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public float[][] latLonToProj​(float[][] from,
                                      float[][] to)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public float[][] latLonToProj​(float[][] from,
                                      int latIndex,
                                      int lonIndex)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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

        @Deprecated
        public float[][] latLonToProj​(float[][] from,
                                      float[][] to,
                                      int latIndex,
                                      int lonIndex)
        Deprecated.
        use Projections.latLonToProj(Projection proj, ...)
        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
      • latLonToProjBB

        public ProjectionRect latLonToProjBB​(LatLonRect latlonRect)
        Deprecated.
        Description copied from interface: Projection
        Convert a lat/lon bounding box to a world coordinate bounding box, by finding the minimum enclosing box. Handles lat/lon points that do not intersect the projection panel.
        Specified by:
        latLonToProjBB in interface Projection
        Parameters:
        latlonRect - input lat,lon bounding box
        Returns:
        minimum enclosing box in world coordinates, or null if no part of the LatLonRect intersects the projection plane
      • projToLatLonBB

        public LatLonRect projToLatLonBB​(ProjectionRect bb)
        Deprecated.
        Description copied from interface: Projection
        Compute lat/lon bounding box from projection bounding box.
        Specified by:
        projToLatLonBB in interface Projection
        Parameters:
        bb - projection bounding box
        Returns:
        lat, lon bounding box.
      • projToLatLonBBold

        @Deprecated
        public LatLonRect projToLatLonBBold​(ProjectionRect world)
        Deprecated.
        do not use
        Convert a world coordinate bounding box to a lat/lon bounding box, by finding the minimum enclosing box.
        Parameters:
        world - input world coordinate bounding box
        Returns:
        minimum enclosing box in lat,lon coordinates.