Class Mercator

    • Constructor Detail

      • Mercator

        public Mercator()
        Constructor with default parameters
      • Mercator

        public Mercator​(double lon0,
                        double par)
        Construct a Mercator Projection.
        Parameters:
        lon0 - longitude of origin (degrees)
        par - standard parallel (degrees). cylinder cuts earth at this latitude.
      • Mercator

        public Mercator​(double lon0,
                        double par,
                        double false_easting,
                        double false_northing)
      • Mercator

        public Mercator​(double lon0,
                        double par,
                        double false_easting,
                        double false_northing,
                        double radius)
        Construct a Mercator Projection.
        Parameters:
        lon0 - longitude of origin (degrees)
        par - standard parallel (degrees). cylinder cuts earth at this latitude.
        false_easting - false_easting in km
        false_northing - false_northing in km
        radius - earth radius in km
    • Method Detail

      • convertScaleToStandardParallel

        public static double convertScaleToStandardParallel​(double scale)
        Convert "scale at standard parellel" to "standard parellel"
        Parameters:
        scale - scale at standard parallel
        Returns:
        standard parallel in degrees
      • getParallel

        public double getParallel()
        Get the first standard parallel
        Returns:
        the first standard parallel
      • getOriginLon

        public double getOriginLon()
        Get the origin longitude.
        Returns:
        the origin longitude.
      • getFalseEasting

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

        public double getFalseNorthing()
        Get the false northing, in km.
        Returns:
        the false northing.
      • getEarthRadius

        public double getEarthRadius()
      • setParallel

        @Deprecated
        public void setParallel​(double par)
        Deprecated.
        Set the first standard parallel
        Parameters:
        par - the first standard parallel
      • setOriginLon

        @Deprecated
        public void setOriginLon​(double lon)
        Deprecated.
        Set the origin longitude.
        Parameters:
        lon - the origin longitude.
      • setFalseEasting

        @Deprecated
        public void setFalseEasting​(double falseEasting)
        Deprecated.
        Set the false_easting, in km. natural_x_coordinate + false_easting = x coordinate
        Parameters:
        falseEasting - x offset
      • setFalseNorthing

        @Deprecated
        public void setFalseNorthing​(double falseNorthing)
        Deprecated.
        Set the false northing, in km. natural_y_coordinate + false_northing = y coordinate
        Parameters:
        falseNorthing - y offset
      • toString

        public String toString()
        Description copied from class: ProjectionImpl
        Get a String representation of this projection.
        Overrides:
        toString in class ProjectionImpl
        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)
      • crossSeam

        public boolean crossSeam​(ProjectionPoint pt1,
                                 ProjectionPoint pt2)
        Does the line between these two points cross the projection "seam".
        Specified by:
        crossSeam in interface Projection
        Specified by:
        crossSeam in class ProjectionImpl
        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 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
      • 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