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


Java Earth类代码示例

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


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

示例1: getMaxEffectiveAltitude

import gov.nasa.worldwind.globes.Earth; //导入依赖的package包/类
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,代码行数:22,代码来源:ScalingTiledImageLayer.java

示例2: setFallbackParams

import gov.nasa.worldwind.globes.Earth; //导入依赖的package包/类
public static void setFallbackParams(Document dataConfig, String filename, AVList params) {
	XPath xpath = WWXML.makeXPath();
	Element domElement = dataConfig.getDocumentElement();

	// If the data configuration document doesn't define a cache name, then compute one using the file's path
	// relative to its file cache directory.
	String s = WWXML.getText(domElement, "DataCacheName", xpath);
	if (s == null || s.length() == 0) DataConfigurationUtils.getDataConfigCacheName(filename, params);

	// If the data configuration document doesn't define the data's extreme elevations, provide default values using
	// the minimum and maximum elevations of Earth.
	String type = DataConfigurationUtils.getDataConfigType(domElement);
	if (type.equalsIgnoreCase("ElevationModel")) {
		if (WWXML.getDouble(domElement, "ExtremeElevations/@min", xpath) == null) params.setValue(AVKey.ELEVATION_MIN, Earth.ELEVATION_MIN);
		if (WWXML.getDouble(domElement, "ExtremeElevations/@max", xpath) == null) params.setValue(AVKey.ELEVATION_MAX, Earth.ELEVATION_MAX);
	}
}
 
开发者ID:TrilogisIT,项目名称:FAO_Application,代码行数:18,代码来源:WorldWindUtils.java

示例3: initWorldWindLayerModel

import gov.nasa.worldwind.globes.Earth; //导入依赖的package包/类
private void initWorldWindLayerModel()
{
    Model model = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
    model.setShowWireframeExterior(false);
    model.setShowWireframeInterior(false);
    model.setShowTessellationBoundingVolumes(false);

    if (is3DGlobe) {
        model.setGlobe(new Earth());
    } else {
        model.setGlobe(new EarthFlat());
    }

    world = new WorldWindowGLCanvas();
    world.setModel(model);
}
 
开发者ID:vobject,项目名称:maru,代码行数:17,代码来源:WorldWindMap.java

示例4: getMinEffectiveAltitude

import gov.nasa.worldwind.globes.Earth; //导入依赖的package包/类
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,代码行数:13,代码来源:ScalingTiledImageLayer.java

示例5: setSphereGlobe

import gov.nasa.worldwind.globes.Earth; //导入依赖的package包/类
/**
 * Set the globe as sphere.
 */
public void setSphereGlobe() {
    Earth globe = new Earth();
    wwd.getModel().setGlobe(globe);
    wwd.getView().stopMovement();
    wwd.redraw();
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:10,代码来源:NwwPanel.java

示例6: setFlatSphereGlobe

import gov.nasa.worldwind.globes.Earth; //导入依赖的package包/类
/**
 * Set the globe as flat sphere.
 */
public void setFlatSphereGlobe() {
    Earth globe = new Earth();
    globe.setElevationModel(new ZeroElevationModel());
    wwd.getModel().setGlobe(globe);
    wwd.getView().stopMovement();
    wwd.redraw();
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:11,代码来源:NwwPanel.java

示例7: AppPanel

import gov.nasa.worldwind.globes.Earth; //导入依赖的package包/类
public AppPanel(final WorldWindowGLCanvas shareWith, final boolean includeStatusBar, final boolean flatWorld,
                final boolean removeExtraLayers) {
    super(new BorderLayout());

    this.wwd = new WorldWindowGLCanvas(shareWith);

    // Create the default model as described in the current worldwind properties.
    final Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
    this.wwd.setModel(m);
    if (flatWorld) {
        m.setGlobe(new EarthFlat());
        this.wwd.setView(new FlatOrbitView());
    } else {
        m.setGlobe(new Earth());
        this.wwd.setView(new BasicOrbitView());
    }

    if (removeExtraLayers) {
        final LayerList layerList = m.getLayers();
        for (Layer layer : layerList) {
            if (layer instanceof CompassLayer || layer instanceof WorldMapLayer || layer instanceof StarsLayer ||
                    layer instanceof LandsatI3WMSLayer || layer instanceof SkyGradientLayer)
                layerList.remove(layer);
        }
    }

    // Setup a select listener for the worldmap click-and-go feature
    this.wwd.addSelectListener(new ClickAndGoSelectListener(wwd, WorldMapLayer.class));

    this.wwd.getSceneController().setClutterFilter(new PlacemarkClutterFilter());

    this.add(this.wwd, BorderLayout.CENTER);

    if (includeStatusBar) {
        this.statusBar = new MinimalStatusBar();
        this.add(statusBar, BorderLayout.PAGE_END);
        this.statusBar.setEventSource(wwd);
    }
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:40,代码来源:AppPanel.java

示例8: distance

import gov.nasa.worldwind.globes.Earth; //导入依赖的package包/类
/**
 * 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,代码行数:14,代码来源:Util.java


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