Class ProjectionImpl

java.lang.Object
ucar.unidata.geoloc.ProjectionImpl
All Implemented Interfaces:
Serializable, Projection

@Deprecated public abstract class ProjectionImpl extends Object implements Projection, Serializable
Deprecated.
only use Projection interface in 6; will not implement Serializable in ver6
Superclass for our implementations of geoloc.Projection.

All subclasses must:

  • override equals() and return true when all parameters are equal
  • create "atts" list of parameters as string-valued Attribute pairs
  • implement abstract methods

If possible, set defaultmapArea to some reasonable world coord bounding box otherwise, provide a way for the user to specify it when a specific projection is created.

Note on "false_easting" and "fale_northing" projection parameters:

  • false_easting(northing) = The value added to all x (y) values in the rectangular coordinates for a map projection. This value frequently is assigned to eliminate negative numbers. Expressed in the unit of measure identified in Planar Coordinate Units.
  • We dont currently use, assuming that the x and y are just fine as negative numbers.
See Also:
  • Field Details

  • Method Details

    • 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
    • setName

      @Deprecated public void setName(String name)
      Deprecated.
      use builder
    • 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<ucar.unidata.util.Parameter> getProjectionParameters()
      Deprecated.
      Get parameters as list of ucar.unidata.util.Parameter
      Specified by:
      getProjectionParameters in interface Projection
      Returns:
      List of parameters
    • findProjectionParameter

      @Deprecated public ucar.unidata.util.Parameter findProjectionParameter(String want)
      Deprecated.
      do not use
    • 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.