All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.gov.nasa.worldwindx.examples.BathymetryRemoval Maven / Gradle / Ivy

Go to download

World Wind is a collection of components that interactively display 3D geographic information within Java applications or applets.

There is a newer version: 2.0.0-986
Show newest version
/*
 * Copyright (C) 2012 United States Government as represented by the Administrator of the
 * National Aeronautics and Space Administration.
 * All Rights Reserved.
 */
package gov.nasa.worldwindx.examples;

import gov.nasa.worldwind.globes.ElevationModel;
import gov.nasa.worldwind.terrain.BathymetryFilterElevationModel;

/**
 * Illustrates how to suppress the World Wind {@link gov.nasa.worldwind.globes.Globe}'s bathymetry
 * (elevations below mean sea level) by using a {@link BathymetryFilterElevationModel}.
 *
 * @author tag
 * @version $Id: BathymetryRemoval.java 1171 2013-02-11 21:45:02Z dcollins $
 */
public class BathymetryRemoval extends ApplicationTemplate
{
    public static class AppFrame extends ApplicationTemplate.AppFrame
    {
        public AppFrame()
        {
            // Get the current elevation model.
            ElevationModel currentElevationModel = this.getWwd().getModel().getGlobe().getElevationModel();

            // Wrap it with the no-bathymetry elevation model.
            BathymetryFilterElevationModel noDepthModel = new BathymetryFilterElevationModel(currentElevationModel);

            // Have the globe use the no-bathymetry elevation model.
            this.getWwd().getModel().getGlobe().setElevationModel(noDepthModel);

            // Increase vertical exaggeration to make it clear that bathymetry is suppressed.
            this.getWwd().getSceneController().setVerticalExaggeration(5d);
        }
    }

    public static void main(String[] args)
    {
        ApplicationTemplate.start("World Wind Bathymetry Removal", AppFrame.class);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy