/** * Constructs and initializes a <code>LatLonGeo</code> at the given coordinates. Altitude * will default to 0. * * @param northLat north latitude in degrees of the newly constructed <code>LatLonGeo</code> * @param eastLon east longitude in degrees of the newly constructed <code>LatLonGeo</code> */ public static LatLonGeo fromDeg( double northLat, double eastLon ) { return new LatLonGeo( northLat * piOver180, eastLon * piOver180, 0d, true ); }
@Override public LatLonGeo unproject( double x, double y ) { return LatLonGeo.fromDeg( y, x ); }
public static final LatLonRect fromUnitVectorAndLength( double xUnit, double yUnit, double zUnit, double length ) { return new LatLonRect( xUnit, yUnit, zUnit, length ); }
/** * Returns a newly constructed <code>LatLonGeo</code> with a * new altitude but same latitude and same longitude as the current * <code>LatLonGeo</code>. * * @param altitude altitude of the newly constructed <code>LatLonGeo</code> */ public LatLonGeo withAltitude( double altitude ) { return new LatLonGeo( getLatRad( ), getLonRad( ), altitude, true ); }
/** * Same as {@link LatLonGeo#displacedBy(double, double, Datum)}, only * the default datum is used instead of a user-supplied datum. * * @see{@link LatLonGeo#defaultDatum} */ public LatLonGeo displacedBy( double dist, double azimuth ) { return displacedBy( dist, azimuth, defaultDatum ); }
public DistanceAzimuth getDistanceAzimuthTo( LatLonGeo to ) { return getDistanceAzimuthTo( to, defaultDatum ); }
public double getAzimuthFrom( LatLonGeo from ) { return getAzimuthFrom( from, defaultDatum ); }
public double getAzimuthTo( LatLonGeo to ) { return getAzimuthTo( to, defaultDatum ); }
public String format( String componentFormat ) { return formatDeg( componentFormat ); }
/** * Normalizes a longitude to be in the range [-π,π) radians. * * <p>Warning: This method produces a near-infinite loop if argument is a very large value.</p> */ public static final double normalizeLon( double lonRad ) { return normalizeAnglePi( lonRad ); }
public double getDistanceTo( LatLonGeo to ) { return getDistanceTo( to, defaultDatum ); }
public LatLonGeo getNeCorner( ) { return LatLonGeo.fromDeg( neCorner.lat, neCorner.lon ); }
/** * Constructs and initializes a <code>LatLonGeo</code> at the given coordinates. * * @param northLat north latitude in radians of the newly constructed <code>LatLonGeo</code> * @param eastLon east longitude in radians of the newly constructed <code>LatLonGeo</code> * @param altitude altitude in system units of the newly constructed <code>LatLonGeo</code> */ public static LatLonGeo fromRad( double northLat, double eastLon, double altitude ) { return new LatLonGeo( northLat, eastLon, altitude, true ); }
public final LatLonRect withLength( double length ) { return new LatLonRect( xUnit, yUnit, zUnit, length ); }
public LatLonGeo getSwCorner( ) { return LatLonGeo.fromDeg( swCorner.lat, swCorner.lon ); }
/** * Constructs and initializes a <code>LatLonGeo</code> at the given coordinates. * * @param northLat north latitude in degrees of the newly constructed <code>LatLonGeo</code> * @param eastLon east longitude in degrees of the newly constructed <code>LatLonGeo</code> * @param altitude altitude in system units of the newly constructed <code>LatLonGeo</code> */ public static LatLonGeo fromDeg( double northLat, double eastLon, double altitude ) { return new LatLonGeo( northLat * piOver180, eastLon * piOver180, altitude, true ); }
public final LatLonRect scale( double by ) { return new LatLonRect( xUnit, yUnit, zUnit, length * by ); }
/** * Constructs and initializes a <code>LatLonGeo</code> at the given coordinates. Altitude * will default to 0. * * @param northLat north latitude in radians of the newly constructed <code>LatLonGeo</code> * @param eastLon east longitude in radians of the newly constructed <code>LatLonGeo</code> */ public static LatLonGeo fromRad( double northLat, double eastLon ) { return new LatLonGeo( northLat, eastLon, 0d, true ); }
public static LatLonRect fromXyz( double x, double y, double z ) { return new LatLonRect( x, y, z ); }