Class InstallImageryAndElevationsDemo
- java.lang.Object
-
- gov.nasa.worldwindx.examples.ApplicationTemplate
-
- gov.nasa.worldwindx.examples.dataimport.InstallImageryAndElevationsDemo
-
public class InstallImageryAndElevationsDemo extends ApplicationTemplate
Illustrates a simple application that installs imagery and elevation data for use in WorldWind. The application enables the user to locate and install imagery or elevation data on the local hard drive. Once installed, the data is visualized in WorldWind either as a
or anTiledImageLayer
. The application also illustrates how to visualize data that has been installed during a previous session.ElevationModel
For the simplest possible examples of installing imagery and elevation data, see the examples
andInstallImagery
.InstallElevations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InstallImageryAndElevationsDemo.AppFrame
protected static class
InstallImageryAndElevationsDemo.InstallableDataFilter
static class
InstallImageryAndElevationsDemo.InstalledDataFrame
-
Nested classes/interfaces inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
ApplicationTemplate.AppPanel
-
-
Constructor Summary
Constructors Constructor Description InstallImageryAndElevationsDemo()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static void
addInstalledData(org.w3c.dom.Document dataConfig, AVList params, InstalledDataPanel panel)
protected static java.lang.String
askForDatasetName(java.lang.String suggestedName)
protected static org.w3c.dom.Document
createDataStore(java.io.File[] files, FileStore fileStore, DataStoreProducer producer)
protected static DataStoreProducer
createDataStoreProducerFromFiles(java.io.File[] files)
Creates an instance of the DataStoreProducer basing on raster type.protected static org.w3c.dom.Document
installDataFromFiles(java.awt.Component parentComponent, java.io.File[] files, FileStore fileStore)
protected static void
loadInstalledDataFromDirectory(java.io.File dir, InstalledDataPanel panel)
protected static void
loadInstalledDataFromFileStore(FileStore fileStore, InstalledDataPanel panel)
static void
main(java.lang.String[] args)
protected static void
setFallbackParams(org.w3c.dom.Document dataConfig, java.lang.String filename, AVList params)
protected static java.lang.String
suggestDatasetName(java.io.File[] files)
Suggests a name for a dataset based on pathnames of the passed files.-
Methods inherited from class gov.nasa.worldwindx.examples.ApplicationTemplate
insertAfterPlacenames, insertBeforeCompass, insertBeforeLayerName, insertBeforePlacenames, start
-
-
-
-
Method Detail
-
addInstalledData
protected static void addInstalledData(org.w3c.dom.Document dataConfig, AVList params, InstalledDataPanel panel)
-
loadInstalledDataFromDirectory
protected static void loadInstalledDataFromDirectory(java.io.File dir, InstalledDataPanel panel)
-
loadInstalledDataFromFileStore
protected static void loadInstalledDataFromFileStore(FileStore fileStore, InstalledDataPanel panel)
-
setFallbackParams
protected static void setFallbackParams(org.w3c.dom.Document dataConfig, java.lang.String filename, AVList params)
-
installDataFromFiles
protected static org.w3c.dom.Document installDataFromFiles(java.awt.Component parentComponent, java.io.File[] files, FileStore fileStore) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createDataStore
protected static org.w3c.dom.Document createDataStore(java.io.File[] files, FileStore fileStore, DataStoreProducer producer) throws java.lang.Exception
- Throws:
java.lang.Exception
-
askForDatasetName
protected static java.lang.String askForDatasetName(java.lang.String suggestedName)
-
suggestDatasetName
protected static java.lang.String suggestDatasetName(java.io.File[] files)
Suggests a name for a dataset based on pathnames of the passed files.Attempts to extract all common words that files' path can share, removes all non-alpha-numeric chars
- Parameters:
files
- Array of raster files- Returns:
- A suggested name
-
createDataStoreProducerFromFiles
protected static DataStoreProducer createDataStoreProducerFromFiles(java.io.File[] files) throws java.lang.IllegalArgumentException
Creates an instance of the DataStoreProducer basing on raster type. Also validates that all rasters are the same types.- Parameters:
files
- Array of raster files- Returns:
- instance of the DataStoreProducer
- Throws:
java.lang.IllegalArgumentException
- if types of rasters do not match, or array of raster files is null or empty
-
main
public static void main(java.lang.String[] args)
-
-