Package chunmap.model.crs.transf

Source Code of chunmap.model.crs.transf.PlanTransform

/**
* Copyright (c) 2009-2011, chunquedong(YangJiandong)
*
* This file is part of ChunMap project
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
*
* History:
*     2010-05-05  Jed Young  Creation
*/
package chunmap.model.crs.transf;

import static java.lang.Math.*;
import chunmap.model.coord.Coordinate2D;
import chunmap.model.coord.CPoint;

public class PlanTransform  extends SphericalPolar{

  public PlanTransform(double f0, double l0) {
    super(f0, l0);
  }

  @Override
  public CPoint convert(CPoint p) {
    double f=toRadians( p.getY());
    double l=toRadians( p.getX());
   
    double cosz=cosz(f,l);
    double cota=sinzcosa(f,l)/sinzsina(f,l);
    double x=atan(cota/cosz);
    double cosx=cos(x);
    double y=atan(cosx/cosz);
   
    return new Coordinate2D(y,x);
  }

}
TOP

Related Classes of chunmap.model.crs.transf.PlanTransform

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.