private double getScaleFactor(double lat_ts, boolean north) {
    """
	Calculate polar stereographic scale factor based on the natural latitude and
	longitude of the original
	Ref: OGP Surveying and Positioning Guidance Note number 7, part 2 April 2009
	http://www.epsg.org
	added by Qun He <qunhe@unc.edu>
	
	@param lat_ts Latitude at natural origin
	@param north  Is it north polar?
	@return scale factor
    """
    double e = 0.081819191;
    double tf = 1.0, mf = 1.0, k0 = 1.0;
    double root = (1 + e * Math.sin(lat_ts)) / (1 - e * Math.sin(lat_ts));
    double power = e / 2;

    if (north)
      tf = Math.tan(Math.PI / 4 - lat_ts / 2) * (Math.pow(root, power));
    else
      tf = Math.tan(Math.PI / 4 + lat_ts / 2) / (Math.pow(root, power));

    mf = Math.cos(lat_ts) / Math.sqrt(1 - e * e * Math.pow(Math.sin(lat_ts), 2));
    k0 = mf * Math.sqrt(Math.pow(1 + e, 1 + e) * Math.pow(1 - e, 1 - e)) / (2 * tf);

    return Double.isNaN(k0) ? 1.0 : k0;
  }
private double getScaleFactor(double lat_ts, boolean north) {
    double e = 0.081819191;
    double tf = 1.0, mf = 1.0, k0 = 1.0;
    double root = (1 + e * Math.sin(lat_ts)) / (1 - e * Math.sin(lat_ts));
    double power = e / 2;

    if (north)
      tf = Math.tan(Math.PI / 4 - lat_ts / 2) * (Math.pow(root, power));
    else
      tf = Math.tan(Math.PI / 4 + lat_ts / 2) / (Math.pow(root, power));

    mf = Math.cos(lat_ts) / Math.sqrt(1 - e * e * Math.pow(Math.sin(lat_ts), 2));
    k0 = mf * Math.sqrt(Math.pow(1 + e, 1 + e) * Math.pow(1 - e, 1 - e)) / (2 * tf);

    return Double.isNaN(k0) ? 1.0 : k0;
  }
private double getScaleFactor ( double lat_ts , boolean north ) { double e = 0.081819191 ; double tf = 1.0 , mf = 1.0 , k0 = 1.0 ; double root = ( 1 + e * Math . sin ( lat_ts ) ) / ( 1 - e * Math . sin ( lat_ts ) ) ; double power = e / 2 ; if ( north ) tf = Math . tan ( Math . PI / 4 - lat_ts / 2 ) * ( Math . pow ( root , power ) ) ; else tf = Math . tan ( Math . PI / 4 + lat_ts / 2 ) / ( Math . pow ( root , power ) ) ; mf = Math . cos ( lat_ts ) / Math . sqrt ( 1 - e * e * Math . pow ( Math . sin ( lat_ts ) , 2 ) ) ; k0 = mf * Math . sqrt ( Math . pow ( 1 + e , 1 + e ) * Math . pow ( 1 - e , 1 - e ) ) / ( 2 * tf ) ; return Double . isNaN ( k0 ) ? 1.0 : k0 ; }
Calculate polar stereographic scale factor based on the natural latitude and
longitude of the original
Ref: OGP Surveying and Positioning Guidance Note number 7, part 2 April 2009
http://www.epsg.org
added by Qun He <qunhe@unc.edu>

@param lat_ts Latitude at natural origin
@param north  Is it north polar?
@return scale factor
Calculate polar stereographic scale factor based on the natural latitude and longitude of the original Ref : OGP Surveying and Positioning Guidance Note number 7 part 2 April 2009 http : // www . epsg . org added by Qun He <qunhe@unc . edu >