本文整理了Java中gov.nasa.worldwind.geom.Angle
类的一些代码示例,展示了Angle
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Angle
类的具体详情如下:
包路径:gov.nasa.worldwind.geom.Angle
类名称:Angle
[英]Represents a geometric angle. Instances of Angle
are immutable. An angle can be obtained through the factory methods #fromDegrees and #fromRadians.
[中]表示几何角度。Angle
的实例是不可变的。可以通过工厂方法#从度和#从弧度获得角度。
代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan
/**
* Divides this angle by <code>divisor</code>. This angle remains unchanged. The result is returned as a new angle.
* Behaviour is undefined if <code>divisor</code> equals zero.
*
* @param divisor the number to be divided by.
*
* @return a new angle equivalent to this angle divided by <code>divisor</code>.
*/
public final Angle divide(double divisor)
{
return Angle.fromDegrees(this.degrees / divisor);
}
代码示例来源:origin: com.metsci.glimpse/glimpse-extras-worldwind
public static LatLonGeo fromLatLon( LatLon latlon )
{
return LatLonGeo.fromDeg( latlon.latitude.getDegrees( ), latlon.longitude.getDegrees( ) );
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
/**
* Create an arbitrary set of UTM coordinates with the given values.
*
* @param latitude the latitude <code>Angle</code>.
* @param longitude the longitude <code>Angle</code>.
* @param zone the UTM zone - 1 to 60.
* @param hemisphere the hemisphere, either {@link gov.nasa.worldwind.avlist.AVKey#NORTH} or {@link
* gov.nasa.worldwind.avlist.AVKey#SOUTH}.
* @param easting the easting distance in meters
* @param northing the northing distance in meters.
*
* @throws IllegalArgumentException if <code>latitude</code> or <code>longitude</code> is null.
*/
public UTMCoord(Angle latitude, Angle longitude, int zone, String hemisphere, double easting, double northing)
{
this(latitude, longitude, zone, hemisphere, easting, northing, Angle.fromDegreesLongitude(0.0));
}
代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan
/**
* get my DMS representation
* @return the Degrees Minutes Second representation
*/
public String getDMS() {
String dms = "?";
if (latAngle.getDegrees() != 0.0) {
dms = latAngle.toFormattedDMSString() + " "
+ lonAngle.toFormattedDMSString();
}
return dms;
}
代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan
public static Angle normalizedLatitude(Angle unnormalizedAngle)
{
if (unnormalizedAngle == null)
{
throw new IllegalArgumentException("Angle Is Null");
}
return Angle.fromDegrees(normalizedDegreesLatitude(unnormalizedAngle.degrees));
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
public static Angle normalizedLongitude(Angle unnormalizedAngle)
{
if (unnormalizedAngle == null)
{
throw new IllegalArgumentException("Angle Is Null");
}
return Angle.fromDegrees(normalizedDegreesLongitude(unnormalizedAngle.degrees));
}
代码示例来源:origin: senbox-org/s1tbx
double arrowHeadLength = Angle.fromDegrees(arrowLength_deg).radians * GLOBE_RADIUS / 3;
final Position startPos = new Position(Angle.fromDegreesLatitude(avgLat), Angle.fromDegreesLongitude(avgLon), 10.0);
final Position endPos = new Position(LatLon.greatCircleEndPosition(startPos, Angle.fromDegrees(avgWindDir), Angle.fromDegrees(arrowLength_deg)), 10.0);
double cumAvgWindSpeed = 0;
double cumAvgWindDir = 0;
Position cumStartPos = new Position(Angle.fromDegreesLatitude(0.0), Angle.fromDegreesLongitude(0.0), 10.0);
Position cumEndPos = new Position(Angle.fromDegreesLatitude(0.0), Angle.fromDegreesLongitude(0.0), 10.0);
double cumStartPosLat_deg = 0;
double cumStartPosLon_deg = 0;
if (firstPosNext) {
cumStartPos = cumStartPos.add(pos);
cumStartPosLat_deg += pos.getLatitude().getDegrees();
cumStartPosLon_deg += pos.getLongitude().getDegrees();
firstPosNext = false;
} else {
Position bigCellStartPos = new Position(Angle.fromDegreesLatitude(cumStartPosLat_deg), Angle.fromDegreesLongitude(cumStartPosLon_deg), 10.0);
Position bigCellEndPos = new Position(LatLon.greatCircleEndPosition(bigCellStartPos, Angle.fromDegrees(cumAvgWindDir), Angle.fromDegrees(bigCellArrowLength_deg)), 10.0);
代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan
public final Angle addRadians(double radians)
{
return Angle.fromRadians(this.radians + radians);
}
代码示例来源:origin: it.tidalwave.geo/it-tidalwave-geo-viewer-spi-worldwindprovider
@Override
@Nonnull
public LatLon next()
{
final Coordinate coordinate = featureManagerSpi.findCoordinate(iterator.next());
return new LatLon(Angle.fromDegreesLatitude(coordinate.getLatitude()),
Angle.fromDegreesLongitude(coordinate.getLongitude()));
}
代码示例来源:origin: it.tidalwave.geo/it-tidalwave-geo-viewer-spi-worldwindprovider
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
@Override
public void fitView (final @Nonnull Sector sector)
{
logger.info("fitView(%s)", sector);
final double angle = sector.getMaxDelta();
final OrbitView view = (OrbitView)worldWindow.getView();
final Angle fov = view.getFieldOfView();
// TODO: see http://forum.worldwindcentral.com/showthread.php?p=49433#post49433
final double elevation = 6400 * 1000 * angle / (fov.getDegrees() / 2);
logger.fine(">>>> fov: %f, sector delta: %s, elevation: %f", fov.getDegrees(), angle, elevation);
setCenterPosition(sector.getCenter(), elevation, Angle.ZERO, Angle.fromDegrees(45));
}
代码示例来源:origin: senbox-org/s1tbx
double arrowHeadLength = Angle.fromDegrees(arrowLength_deg).radians * GLOBE_RADIUS / 3;
final Position startPos = new Position(Angle.fromDegreesLatitude(latValues[ind]), Angle.fromDegreesLongitude(lonValues[ind]), 10.0);
final Position endPos = new Position(LatLon.greatCircleEndPosition(startPos, Angle.fromDegrees(waveDirValues[ind]), Angle.fromDegrees(arrowLength_deg)), 10.0);
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
public Position add(Position that)
{
Angle lat = Angle.normalizedLatitude(this.latitude.add(that.latitude));
Angle lon = Angle.normalizedLongitude(this.longitude.add(that.longitude));
return new Position(lat, lon, this.elevation + that.elevation);
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
public Sector(Sector sector)
{
if (sector == null)
{
throw new IllegalArgumentException("Sector Is Null");
}
this.minLatitude = new Angle(sector.getMinLatitude());
this.maxLatitude = new Angle(sector.getMaxLatitude());
this.minLongitude = new Angle(sector.getMinLongitude());
this.maxLongitude = new Angle(sector.getMaxLongitude());
this.deltaLat = Angle.fromDegrees(this.maxLatitude.degrees - this.minLatitude.degrees);
this.deltaLon = Angle.fromDegrees(this.maxLongitude.degrees - this.minLongitude.degrees);
}
代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan
/**
* Obtains an angle from a specified number of radians.
*
* @param radians the size in radians of the angle to be obtained.
*
* @return a new angle, whose size in radians is given by <code>radians</code>.
*/
public static Angle fromRadians(double radians)
{
return new Angle(RADIANS_TO_DEGREES * radians, radians);
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
double fov = horizontalFieldOfView.getDegrees();
double farMinusNear = far - near;
throw new IllegalArgumentException("Clipping Distance Out Of Range");
double focalLength = 1d / horizontalFieldOfView.tanHalfAngle();
double aspect = viewportHeight / (double) viewportWidth;
double lrLen = Math.sqrt(focalLength * focalLength + 1);
代码示例来源:origin: it.tidalwave.geo/it-tidalwave-geo-viewer-spi-worldwindprovider
t2 = t1.add(dLon);
代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan
public final Angle subtractRadians(double radians)
{
return Angle.fromRadians(this.radians - radians);
}
代码示例来源:origin: it.tidalwave.geo/it-tidalwave-geo-viewer-spi-worldwindprovider
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
@Nonnull
private static Position toPosition (final @Nonnull Coordinate coordinate)
{
return new Position(Angle.fromDegreesLatitude(coordinate.getLatitude()),
Angle.fromDegreesLongitude(coordinate.getLongitude()),
coordinate.getAltitude()); // FIXME: meters/feet?
}
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
public LatLon add(LatLon that)
{
if (that == null)
{
throw new IllegalArgumentException("Angle Is Null");
}
Angle lat = Angle.normalizedLatitude(this.latitude.add(that.latitude));
Angle lon = Angle.normalizedLongitude(this.longitude.add(that.longitude));
return new LatLon(lat, lon);
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
public static Angle normalizedLatitude(Angle unnormalizedAngle)
{
if (unnormalizedAngle == null)
{
throw new IllegalArgumentException("Angle Is Null");
}
return Angle.fromDegrees(normalizedDegreesLatitude(unnormalizedAngle.degrees));
}
内容来源于网络,如有侵权,请联系作者删除!