Class AlbersEqualAreaEllipse

  • All Implemented Interfaces:
    Serializable, Projection

    public class AlbersEqualAreaEllipse
    extends ProjectionImpl
    Adapted from com.jhlabs.map.proj.AlbersProjection
    Since:
    Oct 8, 2009
    See Also:
    "http://www.jhlabs.com/java/maps/proj/index.html", "http://trac.osgeo.org/proj/", Serialized Form
    • Constructor Detail

      • AlbersEqualAreaEllipse

        public AlbersEqualAreaEllipse()
        Constructor with default parameters
      • AlbersEqualAreaEllipse

        public AlbersEqualAreaEllipse​(double lat0,
                                      double lon0,
                                      double par1,
                                      double par2,
                                      double falseEasting,
                                      double falseNorthing,
                                      Earth earth)
        Construct a AlbersEqualAreaEllipse Projection, two standard parellels. For the one standard parellel case, set them both to the same value.
        Parameters:
        lat0 - lat origin of the coord. system on the projection plane
        lon0 - lon origin of the coord. system on the projection plane
        par1 - standard parallel 1
        par2 - standard parallel 2
        falseEasting - false easting in km
        falseNorthing - false easting in km
        earth - shape of the earth
        Throws:
        IllegalArgumentException - if Math.abs(par1 + par2) < 1.e-10
    • Method Detail

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

        public Earth getEarth()
      • getParallelTwo

        public double getParallelTwo()
        Get the second standard parallel
        Returns:
        the second standard parallel in degrees
      • getParallelOne

        public double getParallelOne()
        Get the first standard parallel
        Returns:
        the first standard parallel in degrees
      • getOriginLon

        public double getOriginLon()
        Get the origin longitude.
        Returns:
        the origin longitude in degrees
      • getOriginLat

        public double getOriginLat()
        Get the origin latitude.
        Returns:
        the origin latitude in degrees
      • getFalseEasting

        public double getFalseEasting()
        Get the false easting, in km.
        Returns:
        the false easting in km
      • getFalseNorthing

        public double getFalseNorthing()
        Get the false northing, in km.
        Returns:
        the false northing in km
      • 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.
      • projToLatLon

        public LatLonPoint projToLatLon​(ProjectionPoint world,
                                        LatLonPointImpl result)
        Description copied from class: ProjectionImpl
        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