• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ElevationModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: findElevationModelPosition

import gov.nasa.worldwind.globes.ElevationModel; //导入依赖的package包/类
protected int findElevationModelPosition(WorldWindow wwd, ElevationModel elevationModel)
{
    // Determines the ordinal location of an elevation model in the globe's elevation models.

    if (!(wwd.getModel().getGlobe().getElevationModel() instanceof CompoundElevationModel))
        return -1;

    CompoundElevationModel cem = (CompoundElevationModel) wwd.getModel().getGlobe().getElevationModel();

    for (int i = 0; i < cem.getElevationModels().size(); i++)
    {
        if (elevationModel == cem.getElevationModels().get(i))
            return i;
    }

    return -1;
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:18,代码来源:ElevationModelPanel.java


示例2: updateComponent

import gov.nasa.worldwind.globes.ElevationModel; //导入依赖的package包/类
protected void updateComponent(Object component, boolean enable)
{
    if (component instanceof Layer)
    {
        Layer layer = (Layer) component;
        LayerList layers = this.wwd.getModel().getLayers();

        layer.setEnabled(enable);

        if (enable)
        {
            if (!layers.contains(layer))
            {
                ApplicationTemplate.insertBeforePlacenames(this.wwd, layer);
                this.firePropertyChange("LayersPanelUpdated", null, layer);
            }
        }
        else
        {
            layers.remove(layer);
            this.firePropertyChange("LayersPanelUpdated", layer, null);
        }
    }
    else if (component instanceof ElevationModel)
    {
        ElevationModel model = (ElevationModel) component;
        CompoundElevationModel compoundModel =
            (CompoundElevationModel) this.wwd.getModel().getGlobe().getElevationModel();

        if (enable)
        {
            if (!compoundModel.getElevationModels().contains(model))
                compoundModel.addElevationModel(model);
        }
    }
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:37,代码来源:WMSLayersPanel.java


示例3: moveElevationModel

import gov.nasa.worldwind.globes.ElevationModel; //导入依赖的package包/类
protected void moveElevationModel(WorldWindow wwd, ElevationModel elevationModel, int direction)
{
    // Moves the model associated with this instance in the direction indicated relative to the other models.

    int index = this.findElevationModelPosition(wwd, elevationModel);
    if (index < 0)
        return; // model not found or not a globe isn't using a CompoundElevationModel

    CompoundElevationModel cem = (CompoundElevationModel) wwd.getModel().getGlobe().getElevationModel();

    if (direction < 0 && index == 0) // can't move lowest layer any lower
        return;

    if (direction > 0 && index == cem.getElevationModels().size() - 1) // can't move highest model any higher
        return;

    // Remove the model from the model list and then re-insert it.

    cem.getElevationModels().remove(elevationModel);

    if (direction > 0)
        cem.getElevationModels().add(index + 1, elevationModel);
    else if (direction < 0)
        cem.getElevationModels().add(index - 1, elevationModel);

    // Update WorldWind so the change is visible.
    wwd.redraw();
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:29,代码来源:ElevationModelPanel.java


示例4: SelectModelAction

import gov.nasa.worldwind.globes.ElevationModel; //导入依赖的package包/类
public SelectModelAction(WorldWindow wwd, ElevationModel elevationModel, boolean selected)
{
    super(elevationModel.getName());

    this.wwd = wwd;
    this.elevationModel = elevationModel;
    this.selected = selected;
    this.elevationModel.setEnabled(this.selected);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:10,代码来源:ElevationModelPanel.java


示例5: addElevation

import gov.nasa.worldwind.globes.ElevationModel; //导入依赖的package包/类
public void addElevation() {
    try {
        final ElevationModel em = makeElevationModel();
        wwd.getModel().getGlobe().setElevationModel(em);
    } catch (Exception ignore) {
    }
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:8,代码来源:AppPanel.java


示例6: BulkDownloadPanel

import gov.nasa.worldwind.globes.ElevationModel; //导入依赖的package包/类
public BulkDownloadPanel(WorldWindow wwd)
{
    this.wwd = wwd;

    // add wanted layers here!
    // this is the default lower level imagery -- also bulk downloadable
    MSVirtualEarthLayer ms = new MSVirtualEarthLayer(MSVirtualEarthLayer.LAYER_HYBRID);
    insertBeforeCompass(wwd, ms);

    OSMMapnikLayer osm = new OSMMapnikLayer();
    osm.setEnabled(false);
    insertBeforeCompass(wwd, osm);

    ViewControlsLayer vcl = new ViewControlsLayer();
    vcl.setPosition(AVKey.SOUTHEAST);
    vcl.setScale(0.6);
    vcl.setLocationOffset(new Vec4(0, 35, 0, 0));
    wwd.addSelectListener(new ViewControlsSelectListener(wwd, vcl));
    insertBeforeCompass(wwd, vcl);



    // Init retievable list
    this.retrievables = new ArrayList<BulkRetrievablePanel>();
    // Layers
    for(Layer layer : this.wwd.getModel().getLayers())
    {
        if(layer instanceof BulkRetrievable)
        {
            this.retrievables.add(new BulkRetrievablePanel((BulkRetrievable)layer));
        }
    }
    // Elevation models
    CompoundElevationModel cem = (CompoundElevationModel)wwd.getModel().getGlobe().getElevationModel();
    for(ElevationModel elevationModel : cem.getElevationModels())
    {
        if(elevationModel instanceof BulkRetrievable)
        {
            this.retrievables.add(new BulkRetrievablePanel((BulkRetrievable)elevationModel));
        }
    }

    // Init sector selector
    this.selector = new SectorSelector(wwd);
    this.selector.setInteriorColor(new Color(1f, 1f, 1f, 0.1f));
    this.selector.setBorderColor(new Color(1f, 0f, 0f, 0.5f));
    this.selector.setBorderWidth(3);
    this.selector.addPropertyChangeListener(SectorSelector.SECTOR_PROPERTY, new PropertyChangeListener()
    {
        public void propertyChange(PropertyChangeEvent evt)
        {
            updateSector();
        }
    });

    JPopupMenu.setDefaultLightWeightPopupEnabled(false);
    ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
    this.initComponents();
}
 
开发者ID:FracturedPlane,项目名称:GpsdInspector,代码行数:60,代码来源:BulkDownload_GPS.java


示例7: getElevationModel

import gov.nasa.worldwind.globes.ElevationModel; //导入依赖的package包/类
public ElevationModel getElevationModel()
{
    return this.elevationModel;
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:5,代码来源:ElevationModelPanel.java


示例8: makeElevationModel

import gov.nasa.worldwind.globes.ElevationModel; //导入依赖的package包/类
private static ElevationModel makeElevationModel() throws URISyntaxException, ParserConfigurationException,
        IOException, SAXException {
    final URI serverURI = new URI("http://www.nasa.network.com/elev");

    final DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    docBuilderFactory.setNamespaceAware(true);
    if (Configuration.getJavaVersion() >= 1.6) {
        try {
            docBuilderFactory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
        } catch (ParserConfigurationException e) {   // Note it and continue on. Some Java5 parsers don't support the feature.
            String message = Logging.getMessage("XML.NonvalidatingNotSupported");
            Logging.logger().finest(message);
        }
    }
    final DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();

    // Request the capabilities document from the server.
    final CapabilitiesRequest req = new CapabilitiesRequest(serverURI);
    final Document doc = docBuilder.parse(req.toString());

    // Parse the DOM as a capabilities document.
    // CHANGED
    //final Capabilities caps = Capabilities.parse(doc);
    final WMSCapabilities caps = new WMSCapabilities(doc);

    final double HEIGHT_OF_MT_EVEREST = 8850d; // meters
    final double DEPTH_OF_MARIANAS_TRENCH = -11000d; // meters

    // Set up and instantiate the elevation model
    final AVList params = new AVListImpl();
    params.setValue(AVKey.LAYER_NAMES, "|srtm3");
    params.setValue(AVKey.TILE_WIDTH, 150);
    params.setValue(AVKey.TILE_HEIGHT, 150);
    params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, LatLon.fromDegrees(20, 20));
    params.setValue(AVKey.NUM_LEVELS, 8);
    params.setValue(AVKey.NUM_EMPTY_LEVELS, 0);
    params.setValue(AVKey.ELEVATION_MIN, DEPTH_OF_MARIANAS_TRENCH);
    params.setValue(AVKey.ELEVATION_MAX, HEIGHT_OF_MT_EVEREST);

    final CompoundElevationModel cem = new CompoundElevationModel();
    cem.addElevationModel(new WMSBasicElevationModel(caps, params));

    return cem;
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:45,代码来源:AppPanel.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TiPresenter类代码示例发布时间:2022-05-22
下一篇:
Java FileEditorMapping类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap