当前位置: 首页>>代码示例>>Java>>正文


Java Earth.WGS84_EQUATORIAL_RADIUS属性代码示例

本文整理汇总了Java中gov.nasa.worldwind.globes.Earth.WGS84_EQUATORIAL_RADIUS属性的典型用法代码示例。如果您正苦于以下问题:Java Earth.WGS84_EQUATORIAL_RADIUS属性的具体用法?Java Earth.WGS84_EQUATORIAL_RADIUS怎么用?Java Earth.WGS84_EQUATORIAL_RADIUS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在gov.nasa.worldwind.globes.Earth的用法示例。


在下文中一共展示了Earth.WGS84_EQUATORIAL_RADIUS属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getMaxEffectiveAltitude

public Double getMaxEffectiveAltitude(Double radius)
{
    if (radius == null)
        radius = Earth.WGS84_EQUATORIAL_RADIUS;

    // Find first non-empty level. Compute altitude at which it comes into effect.
    for (int i = 0; i < this.getLevels().getLastLevel().getLevelNumber(); i++)
    {
        if (this.levels.isLevelEmpty(i))
            continue;

        // Compute altitude associated with the cell height at which it would switch if it had a lower-res level.
        // That cell height is twice that of the current lowest-res level.
        double texelSize = this.levels.getLevel(i).getTexelSize();
        double cellHeight = 2 * radius * texelSize;

        return cellHeight * Math.pow(10, this.getDetailFactor());
    }

    return null;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:21,代码来源:ScalingTiledImageLayer.java

示例2: getMinEffectiveAltitude

public Double getMinEffectiveAltitude(Double radius)
{
    if (radius == null)
        radius = Earth.WGS84_EQUATORIAL_RADIUS;

    // Get the cell size for the highest-resolution level.
    double texelSize = this.getLevels().getLastLevel().getTexelSize();
    double cellHeight = radius * texelSize;

    // Compute altitude associated with the cell height at which it would switch if it had higher-res levels.
    return cellHeight * Math.pow(10, this.getDetailFactor());
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:12,代码来源:ScalingTiledImageLayer.java

示例3: distance

/**
 * Distance between two points on the globe (in km)
 *
 * @param point1
 * @param point2
 * @param globe
 * @return
 */
public static int distance(final RoutePoint point1, final RoutePoint point2) {
	final LatLon ll1 = new LatLon(Angle.fromDegrees(point1.getLat()), Angle.fromDegrees(point1.getLon()));
	final LatLon ll2 = new LatLon(Angle.fromDegrees(point2.getLat()), Angle.fromDegrees(point2.getLon()));
	return (int) (Earth.WGS84_EQUATORIAL_RADIUS * LatLon.greatCircleDistance(ll1, ll2).getRadians() / 1000);
}
 
开发者ID:leolewis,项目名称:openvisualtraceroute,代码行数:13,代码来源:Util.java


注:本文中的gov.nasa.worldwind.globes.Earth.WGS84_EQUATORIAL_RADIUS属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。