本文整理了Java中gov.nasa.worldwind.geom.Angle.getDegrees()
方法的一些代码示例,展示了Angle.getDegrees()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Angle.getDegrees()
方法的具体详情如下:
包路径:gov.nasa.worldwind.geom.Angle
类名称:Angle
方法名:getDegrees
[英]Retrieves the size of this angle in degrees. This method may be faster than first obtaining the radians and then converting to degrees.
[中]检索此角度的大小(以度为单位)。此方法可能比首先获取弧度然后转换为度数更快。
代码示例来源:origin: com.metsci.glimpse/glimpse-extras-worldwind
public static LatLonGeo fromLatLon( LatLon latlon )
{
return LatLonGeo.fromDeg( latlon.latitude.getDegrees( ), latlon.longitude.getDegrees( ) );
}
代码示例来源: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
@Override
public String toString()
{
String las = String.format("Lat %7.4f\u00B0", this.getLatitude().getDegrees());
String los = String.format("Lon %7.4f\u00B0", this.getLongitude().getDegrees());
return "(" + las + ", " + los + ")";
}
代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan
/**
* Divides this angle by another angle. This angle remains unchanged, instead the resulting value in degrees is
* returned.
*
* @param angle the angle by which to divide.
*
* @return this angle's degrees divided by angle's degrees.
*
* @throws IllegalArgumentException if angle is null.
*/
public final double divide(Angle angle)
{
if (angle == null)
{
throw new IllegalArgumentException("Angle Is Null");
}
if (angle.getDegrees() == 0.0)
{
throw new IllegalArgumentException("Divide By Zero");
}
return this.degrees / angle.degrees;
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
/**
* Divides this angle by another angle. This angle remains unchanged, instead the resulting value in degrees is
* returned.
*
* @param angle the angle by which to divide.
*
* @return this angle's degrees divided by angle's degrees.
*
* @throws IllegalArgumentException if angle is null.
*/
public final double divide(Angle angle)
{
if (angle == null)
{
throw new IllegalArgumentException("Angle Is Null");
}
if (angle.getDegrees() == 0.0)
{
throw new IllegalArgumentException("Divide By Zero");
}
return this.degrees / angle.degrees;
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
public static Sector boundingSector(Iterable<? extends LatLon> locations)
{
if (locations == null)
{
throw new IllegalArgumentException("Positions List Is Null");
}
if (!locations.iterator().hasNext())
return EMPTY_SECTOR; // TODO: should be returning null
double minLat = Angle.POS90.getDegrees();
double minLon = Angle.POS180.getDegrees();
double maxLat = Angle.NEG90.getDegrees();
double maxLon = Angle.NEG180.getDegrees();
for (LatLon p : locations)
{
double lat = p.getLatitude().getDegrees();
if (lat < minLat)
minLat = lat;
if (lat > maxLat)
maxLat = lat;
double lon = p.getLongitude().getDegrees();
if (lon < minLon)
minLon = lon;
if (lon > maxLon)
maxLon = lon;
}
return Sector.fromDegrees(minLat, maxLat, minLon, maxLon);
}
代码示例来源:origin: com.metsci.glimpse/glimpse-extras-worldwind
public static LatLonGeo fromPosition( Position position )
{
return LatLonGeo.fromDeg( position.getLatitude( ).getDegrees( ), position.getLongitude( ).getDegrees( ) );
}
代码示例来源:origin: com.metsci.glimpse/glimpse-extras-worldwind
public static LatLonGeo fromPosition( Position position )
{
return LatLonGeo.fromDeg( position.getLatitude( ).getDegrees( ), position.getLongitude( ).getDegrees( ) );
}
代码示例来源:origin: it.tidalwave.geo/it-tidalwave-geo-viewer-spi-worldwindprovider
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
@Nonnull
private static Coordinate toCoordinate (final @Nonnull Position position)
{
return new Coordinate(position.getLatitude().getDegrees(),
position.getLongitude().getDegrees(),
position.getElevation()); // FIXME: meters/feet?
}
代码示例来源: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.metsci.glimpse/glimpse-extras-worldwind
public static LatLonBounds getCorners( List<LatLon> screenCorners )
{
double minLat = Double.POSITIVE_INFINITY;
double minLon = Double.POSITIVE_INFINITY;
double maxLat = Double.NEGATIVE_INFINITY;
double maxLon = Double.NEGATIVE_INFINITY;
for ( LatLon latlon : screenCorners )
{
double lat = latlon.getLatitude( ).getDegrees( );
double lon = latlon.getLongitude( ).getDegrees( );
if ( lat < minLat ) minLat = lat;
if ( lat > maxLat ) maxLat = lat;
if ( lon < minLon ) minLon = lon;
if ( lon > maxLon ) maxLon = lon;
}
return new LatLonBounds( minLat, maxLat, minLon, maxLon );
}
代码示例来源:origin: Berico-Technologies/Geo-Coordinate-Conversion-Java
return null;
double minLat = Angle.POS90.getDegrees();
double minLon = Angle.POS180.getDegrees();
double maxLat = Angle.NEG90.getDegrees();
double maxLon = Angle.NEG180.getDegrees();
double lat = ll.getLatitude().getDegrees();
if (lat < minLat)
minLat = lat;
maxLat = lat;
double lon = ll.getLongitude().getDegrees();
if (lon >= 0 && lon < minLon)
minLon = lon;
double lastLon = lastLocation.getLongitude().getDegrees();
if (Math.signum(lon) != Math.signum(lastLon))
代码示例来源:origin: it.tidalwave.geo/it-tidalwave-geo-viewer-spi-brgmprovider
public URL getURL(Tile tile, String string) throws MalformedURLException
{
StringBuffer sb = new StringBuffer(tile.getLevel().getService());
if (sb.lastIndexOf("?") != sb.length() - 1)
sb.append("?");
sb.append("request=GetMap");
sb.append("&layers=");
sb.append(tile.getLevel().getDataset());
sb.append("&srs=EPSG:4326");
sb.append("&width=");
sb.append(tile.getLevel().getTileWidth());
sb.append("&height=");
sb.append(tile.getLevel().getTileHeight());
Sector s = tile.getSector();
sb.append("&bbox=");
sb.append(s.getMinLongitude().getDegrees());
sb.append(",");
sb.append(s.getMinLatitude().getDegrees());
sb.append(",");
sb.append(s.getMaxLongitude().getDegrees());
sb.append(",");
sb.append(s.getMaxLatitude().getDegrees());
sb.append("&format=image/jpeg");
sb.append("&version=1.1.1");
sb.append("&styles=");
return new java.net.URL(sb.toString());
}
}
代码示例来源:origin: it.tidalwave.geo/it-tidalwave-geo-viewer-spi-geosignalwwjprovider
public URL getURL(Tile tile, String string) throws MalformedURLException {
String layerName = tile.getLevel().getDataset() + layerNames[tile.getLevelNumber()] + "K";
StringBuffer sb = new StringBuffer(tile.getLevel().getService());
if (sb.lastIndexOf("?") != sb.length() - 1) {
sb.append("?");
}
sb.append("request=GetMap");
sb.append("&layers=");
sb.append(layerName);
sb.append("&srs=EPSG:4326");
sb.append("&width=");
sb.append(tile.getLevel().getTileWidth());
sb.append("&height=");
sb.append(tile.getLevel().getTileHeight());
Sector s = tile.getSector();
sb.append("&bbox=");
sb.append(s.getMinLongitude().getDegrees());
sb.append(",");
sb.append(s.getMinLatitude().getDegrees());
sb.append(",");
sb.append(s.getMaxLongitude().getDegrees());
sb.append(",");
sb.append(s.getMaxLatitude().getDegrees());
sb.append("&format=image/png");
sb.append("&version=1.1.1");
sb.append("&styles=");
//System.out.println(tile.getLevelNumber() + " " + sb);
return new java.net.URL(sb.toString());
}
}
代码示例来源: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: Berico-Technologies/Geo-Coordinate-Conversion-Java
double fov = horizontalFieldOfView.getDegrees();
double farMinusNear = far - near;
代码示例来源:origin: com.metsci.glimpse/glimpse-extras-worldwind
LatLonGeo centerLatLon = LatLonGeo.fromDeg( centerPosition.latitude.getDegrees( ), centerPosition.longitude.getDegrees( ) );
LatLonGeo swLatLon = centerLatLon.displacedBy( Length.fromMeters( viewportSizeMeters ), Azimuth.southwest );
LatLonGeo seLatLon = centerLatLon.displacedBy( Length.fromMeters( viewportSizeMeters ), Azimuth.southeast );
代码示例来源:origin: com.metsci.glimpse/glimpse-extras-worldwind
protected GlimpsePosition getGlimpsePosition( MouseEvent mouseEvent )
{
GlimpseTargetStack stack = tile.getTargetStack( );
if ( stack == null ) return null;
Position worldwindPosition = this.wwd.getCurrentPosition( );
if ( worldwindPosition == null ) return null;
// get the lat/lon of the mouse from the WorldWind
double lat = worldwindPosition.getLatitude( ).getDegrees( );
double lon = worldwindPosition.getLongitude( ).getDegrees( );
LatLonGeo latlon = LatLonGeo.fromDeg( lat, lon );
// convert the lat/lon into Glimpse coordinate space using the GeoProjection
Vector2d glimpsePosition = this.projection.project( latlon );
// calculate the x/y position in pixels of the mouse click relative to the GlimpseLayout
Axis2D axis = this.layout.getAxis( stack );
int posX = axis.getAxisX( ).valueToScreenPixel( glimpsePosition.getX( ) );
int posY = axis.getAxisY( ).getSizePixels( ) - axis.getAxisY( ).valueToScreenPixel( glimpsePosition.getY( ) );
return new GlimpsePosition( posX, posY );
}
代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan
public String toString() {
String result = "";
if (this.getLocode() != null) {
result += this.getLocode() + "/";
} else {
result += "? ? /";
}
if (this.getCountryCode() != null) {
result += this.getCountryCode();
} else {
result += "? ";
}
if (this.getNameWoDiacritics() != null) {
result += " " + this.getNameWoDiacritics();
} else {
result += " " + this.getName();
}
this.initLatLon();
if (latAngle.getDegrees() != 0.0)
result += " at " + getDMS();
return result;
}
代码示例来源:origin: senbox-org/s1tbx
if (firstPosNext) {
cumStartPos = cumStartPos.add(pos);
cumStartPosLat_deg += pos.getLatitude().getDegrees();
cumStartPosLon_deg += pos.getLongitude().getDegrees();
firstPosNext = false;
} else {
内容来源于网络,如有侵权,请联系作者删除!