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


Java AVList类代码示例

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


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

示例1: makeLevels

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
private static LevelSet makeLevels(int numLevels) {
	AVList params = new AVListImpl();
	
	params.setValue(AVKey.TILE_WIDTH, TILE_SIZE);
	params.setValue(AVKey.TILE_HEIGHT, TILE_SIZE);
	params.setValue(AVKey.DATA_CACHE_NAME, "scs_tracks");
	params.setValue(AVKey.SERVICE, "null");
	params.setValue(AVKey.DATASET_NAME, "scs_tracks");
	params.setValue(AVKey.FORMAT_SUFFIX, "null");
	params.setValue(AVKey.NUM_LEVELS, numLevels);
	params.setValue(AVKey.NUM_EMPTY_LEVELS, 0);
	params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, new LatLon(Angle.fromDegrees(36), Angle.fromDegrees(36)));
	params.setValue(AVKey.SECTOR, Sector.FULL_SPHERE);
	
	return new LevelSet(params);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:17,代码来源:SCSTileLayer.java

示例2: makeLevels

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
private static LevelSet makeLevels(int numLevels, String name) {
	AVList params = new AVListImpl();
	
	params.setValue(AVKey.TILE_WIDTH, TILE_SIZE);
	params.setValue(AVKey.TILE_HEIGHT, TILE_SIZE);
	params.setValue(AVKey.DATA_CACHE_NAME, "mgg_" + name);
	params.setValue(AVKey.SERVICE, "null");
	params.setValue(AVKey.DATASET_NAME, "mgg_" + name);
	params.setValue(AVKey.FORMAT_SUFFIX, "null");
	params.setValue(AVKey.NUM_LEVELS, numLevels);
	params.setValue(AVKey.NUM_EMPTY_LEVELS, 0);
	params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, new LatLon(Angle.fromDegrees(36), Angle.fromDegrees(36)));
	params.setValue(AVKey.SECTOR, Sector.FULL_SPHERE);
	
	return new LevelSet(params);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:17,代码来源:MGGTileLayer.java

示例3: makeLevels

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
private static LevelSet makeLevels(int numLevels) {
	AVList params = new AVListImpl();
	
	params.setValue(AVKey.TILE_WIDTH, TILE_SIZE);
	params.setValue(AVKey.TILE_HEIGHT, TILE_SIZE);
	params.setValue(AVKey.DATA_CACHE_NAME, "mb_tracks");
	params.setValue(AVKey.SERVICE, "null");
	params.setValue(AVKey.DATASET_NAME, "mb_tracks");
	params.setValue(AVKey.FORMAT_SUFFIX, "null");
	params.setValue(AVKey.NUM_LEVELS, numLevels);
	params.setValue(AVKey.NUM_EMPTY_LEVELS, 0);
	params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, new LatLon(Angle.fromDegrees(36), Angle.fromDegrees(36)));
	params.setValue(AVKey.SECTOR, Sector.FULL_SPHERE);
	
	return new LevelSet(params);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:17,代码来源:MBTileLayer.java

示例4: makeLevels

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
private static LevelSet makeLevels(int numLevels) {
	AVList params = new AVListImpl();
	
	params.setValue(AVKey.TILE_WIDTH, TILE_SIZE);
	params.setValue(AVKey.TILE_HEIGHT, TILE_SIZE);
	params.setValue(AVKey.DATA_CACHE_NAME, "null");
	params.setValue(AVKey.SERVICE, "null");
	params.setValue(AVKey.DATASET_NAME, "grid");
	params.setValue(AVKey.FORMAT_SUFFIX, "null");
	params.setValue(AVKey.NUM_LEVELS, numLevels);
	params.setValue(AVKey.NUM_EMPTY_LEVELS, 0);
	params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, new LatLon(Angle.fromDegrees(36), Angle.fromDegrees(36)));
	params.setValue(AVKey.SECTOR, Sector.FULL_SPHERE);
	
	   return new LevelSet(params);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:17,代码来源:GridTileLayer.java

示例5: createComponent

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
protected static Object createComponent(WMSCapabilities caps, AVList params)
{
    AVList configParams = params.copy(); // Copy to insulate changes from the caller.

    // Some wms servers are slow, so increase the timeouts and limits used by world wind's retrievers.
    configParams.setValue(AVKey.URL_CONNECT_TIMEOUT, 30000);
    configParams.setValue(AVKey.URL_READ_TIMEOUT, 30000);
    configParams.setValue(AVKey.RETRIEVAL_QUEUE_STALE_REQUEST_LIMIT, 60000);

    try
    {
        String factoryKey = getFactoryKeyForCapabilities(caps);
        Factory factory = (Factory) WorldWind.createConfigurationComponent(factoryKey);
        return factory.createFromConfigSource(caps, params);
    }
    catch (Exception e)
    {
        // Ignore the exception, and just return null.
    }

    return null;
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:23,代码来源:WMSLayersPanel.java

示例6: setFallbackParams

import gov.nasa.worldwind.avlist.AVList; //导入依赖的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

示例7: getElevationModel

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
public static ElevationModel getElevationModel(File xml) {
	try {
		if(xml.exists()){
			Document doc=null;
			
			// Get standard document
			doc = WWXML.openDocument(xml);
			doc = DataConfigurationUtils.convertToStandardDataConfigDocument(doc);
			
			AVList params = new AVListImpl();
			WorldWindUtils.setFallbackParams(doc, Constants.ELEVATION_NAME, params);
			
			// Return elevation model in xml file
			BasicElevationModelFactory b = new BasicElevationModelFactory();
			return (ElevationModel) b.createFromConfigSource(xml, params);
		}
	
	} catch (Exception e) {
		e.printStackTrace();
	}
	return null;
}
 
开发者ID:TrilogisIT,项目名称:FAO_Application,代码行数:23,代码来源:WorldWindUtils.java

示例8: appendProperties

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
/**
 * Append Property elements to a context element.
 * 
 * @param context
 *            the context on which to append new element(s)
 * @param properties
 *            AVList with properties to append.
 */
public static void appendProperties(Element context, AVList properties) {
	if (null == context || properties == null) return;

	StringBuilder sb = new StringBuilder();

	// add properties
	for (Map.Entry<String, Object> entry : properties.getEntries()) {
		sb.setLength(0);
		String key = entry.getKey();
		sb.append(properties.getValue(key));
		String value = sb.toString();
		if (WWUtil.isEmpty(key) || WWUtil.isEmpty(value)) continue;

		Element property = WWXML.appendElement(context, "Property");
		WWXML.setTextAttribute(property, "name", key);
		WWXML.setTextAttribute(property, "value", value);
	}
}
 
开发者ID:TrilogisIT,项目名称:FAO_Application,代码行数:27,代码来源:ImportUtils.java

示例9: createConfigDoc

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
/**
 * Returns a Layer configuration document which describes the tiled imagery produced by this TiledImageProducer. The
 * document's contents are based on the configuration document for a TiledImageLayer, except this document describes
 * an offline dataset. This returns null if the parameter list is null, or if the configuration document cannot be
 * created for any reason.
 * 
 * @param params
 *            the parameters which describe a Layer configuration document's contents.
 * @return the configuration document, or null if the parameter list is null or does not contain the required
 *         parameters.
 */
protected Document createConfigDoc(AVList params) {
	AVList configParams = params.copy();

	// Determine a default display name if none exists.
	if (configParams.getValue(AVKey.DISPLAY_NAME) == null) configParams.setValue(AVKey.DISPLAY_NAME, params.getValue(AVKey.DATASET_NAME));

	// Set the SERVICE_NAME and NETWORK_RETRIEVAL_ENABLED parameters to indicate this dataset is offline.
	if (configParams.getValue(AVKey.SERVICE_NAME) == null) configParams.setValue(AVKey.SERVICE_NAME, AVKey.SERVICE_NAME_OFFLINE);

	configParams.setValue(AVKey.NETWORK_RETRIEVAL_ENABLED, Boolean.FALSE);

	// Set the texture format to DDS. If the texture data is already in DDS format, this parameter is benign.
	configParams.setValue(AVKey.TEXTURE_FORMAT, DEFAULT_TEXTURE_FORMAT);

	// Set the USE_MIP_MAPS, and USE_TRANSPARENT_TEXTURES parameters to true. The imagery produced by
	// TiledImageProducer is best viewed with mipMapping enabled, and texture transparency enabled. These parameters
	// tell the consumer of this imagery to enable these features during rendering.
	configParams.setValue(AVKey.USE_MIP_MAPS, Boolean.TRUE);
	configParams.setValue(AVKey.USE_TRANSPARENT_TEXTURES, Boolean.TRUE);

	// Return a configuration file for a TiledImageLayer. TiledImageLayer is the standard WWJ component which
	// consumes and renders tiled imagery.

	return BasicTiledImageLayer.createTiledImageLayerConfigDocument(configParams);
}
 
开发者ID:TrilogisIT,项目名称:FAO_Application,代码行数:37,代码来源:TransparentTiledImageProducer.java

示例10: writeImageMetadata

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
protected void writeImageMetadata(java.io.File file, AVList values) throws java.io.IOException {
    Sector sector = (Sector) values.getValue(AVKey.SECTOR);
    int[] size = (int[]) values.getValue(WorldFile.WORLD_FILE_IMAGE_SIZE);

    double xPixelSize = sector.getDeltaLonDegrees() / size[0];
    double yPixelSize = -sector.getDeltaLatDegrees() / size[1];
    double xCoeff = 0.0;
    double yCoeff = 0.0;
    double xLocation = sector.getMinLongitude().degrees + (xPixelSize * .5);
    double yLocation = sector.getMaxLatitude().degrees + (yPixelSize * .5);

    java.io.PrintWriter out = new java.io.PrintWriter(file);
    try {
        out.println(xPixelSize);
        out.println(xCoeff);
        // noinspection SuspiciousNameCombination
        out.println(yCoeff);
        // noinspection SuspiciousNameCombination
        out.println(yPixelSize);
        out.println(xLocation);
        // noinspection SuspiciousNameCombination
        out.println(yLocation);
    } finally {
        out.close();
    }
}
 
开发者ID:TrilogisIT,项目名称:FAO_Application,代码行数:27,代码来源:ImageIORasterWriter.java

示例11: createComponent

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
private Object createComponent(WMSCapabilities caps, AVList params) {
    AVList configParams = params.copy(); // Copy to insulate changes from the caller.

    // Some wms servers are slow, so increase the timeouts and limits used by world wind's retrievers.
    configParams.setValue(AVKey.URL_CONNECT_TIMEOUT, 30000);
    configParams.setValue(AVKey.URL_READ_TIMEOUT, 30000);
    configParams.setValue(AVKey.RETRIEVAL_QUEUE_STALE_REQUEST_LIMIT, 60000);

    try {
        String factoryKey = getFactoryKeyForCapabilities(caps);
        Factory factory = (Factory) WorldWind.createConfigurationComponent(factoryKey);
        return factory.createFromConfigSource(caps, configParams);
    } catch (Exception e) {
        // Ignore the exception, and just return null.
    }

    return null;
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:19,代码来源:WmsHandler.java

示例12: makeLevels

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
private static LevelSet makeLevels() {
    AVList params = new AVListImpl();

    params.setValue(AVKey.TILE_WIDTH, 256);
    params.setValue(AVKey.TILE_HEIGHT, 256);
    params.setValue(AVKey.DATA_CACHE_NAME, "Earth/OSM-Mercator/OpenStreetMap Mapnik");
    params.setValue(AVKey.SERVICE, "http://a.tile.openstreetmap.org/");
    params.setValue(AVKey.DATASET_NAME, "h");
    params.setValue(AVKey.FORMAT_SUFFIX, ".png");
    params.setValue(AVKey.NUM_LEVELS, 22);
    params.setValue(AVKey.NUM_EMPTY_LEVELS, 0);
    params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, new LatLon(Angle.fromDegrees(22.5d), Angle.fromDegrees(45d)));
    params.setValue(AVKey.SECTOR, new MercatorSector(-1.0, 1.0, Angle.NEG180, Angle.POS180));
    params.setValue(AVKey.TILE_URL_BUILDER, new URLBuilder());

    return new LevelSet(params);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:18,代码来源:OSMMapnikLayer.java

示例13: makeLevels

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
private static LevelSet makeLevels() {
	AVList params = new AVListImpl();

	params.setValue(AVKey.TILE_WIDTH, 512);
	params.setValue(AVKey.TILE_HEIGHT, 512);
	params.setValue(AVKey.DATA_CACHE_NAME, CACHE_NAME);
	params.setValue(AVKey.SERVICE, "null");
	params.setValue(AVKey.DATASET_NAME, "geomapapp.mask");
	params.setValue(AVKey.FORMAT_SUFFIX, ".png");
	params.setValue(AVKey.NUM_LEVELS, 7);
	params.setValue(AVKey.NUM_EMPTY_LEVELS, 0);
	params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, new LatLon(Angle
			.fromDegrees(36d), Angle.fromDegrees(36d)));
	params.setValue(AVKey.SECTOR, Sector.FULL_SPHERE);

	params.setValue(AVKey.TILE_URL_BUILDER, new TileUrlBuilder() {
		public URL getURL(Tile tile, String imageFormat)
				throws MalformedURLException {
			StringBuffer sb = new StringBuffer(BASE_URL);
			sb.append(tile.getLevelNumber());
			sb.append("/");
			sb.append(tile.getRow());
			sb.append("/");
			sb.append(tile.getRow());
			sb.append("_");
			sb.append(tile.getColumn());
			sb.append(".png");
			URL url = URLFactory.url(sb.toString());
			return url;
		}
	});

	return new LevelSet(params);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:35,代码来源:GeoMapAppMaskLayer.java

示例14: createTiledImageLayerConfigDocument

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
/**
 * Creates a configuration document for a TiledImageLayer described by the specified params. The returned document
 * may be used as a construction parameter to {@link gov.nasa.worldwind.layers.BasicTiledImageLayer}.
 *
 * @param params parameters describing the TiledImageLayer.
 *
 * @return a configuration document for the TiledImageLayer.
 */
public static Document createTiledImageLayerConfigDocument(AVList params)
{
    Document doc = WWXML.createDocumentBuilder(true).newDocument();

    Element root = WWXML.setDocumentElement(doc, "Layer");
    WWXML.setIntegerAttribute(root, "version", 1);
    WWXML.setTextAttribute(root, "layerType", "TiledImageLayer");

    createTiledImageLayerConfigElements(params, root);

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

示例15: makeLevels

import gov.nasa.worldwind.avlist.AVList; //导入依赖的package包/类
private static LevelSet makeLevels() 
{
	AVList params = new AVListImpl();

	params.setValue(AVKey.TILE_WIDTH, 512);
	params.setValue(AVKey.TILE_HEIGHT, 512);
	params.setValue(AVKey.DATA_CACHE_NAME, CACHE_NAME);
	params.setValue(AVKey.SERVICE, "null");
	params.setValue(AVKey.DATASET_NAME, "geomapapp.wdmam");
	params.setValue(AVKey.FORMAT_SUFFIX, ".jpg");
	params.setValue(AVKey.NUM_LEVELS, 3);
	params.setValue(AVKey.NUM_EMPTY_LEVELS, 0);
	params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, new LatLon(Angle.fromDegrees(36d), Angle.fromDegrees(36d)));
	params.setValue(AVKey.SECTOR, Sector.FULL_SPHERE);
	
	params.setValue(AVKey.TILE_URL_BUILDER, new TileUrlBuilder() {
		public URL getURL(Tile tile, String imageFormat) throws MalformedURLException {
			StringBuffer sb = new StringBuffer(BASE_URL);
			sb.append(tile.getLevelNumber());
			sb.append("/");
			sb.append(tile.getRow());
			sb.append("/");
			sb.append(tile.getRow());
			sb.append("_");
			sb.append(tile.getColumn());
			sb.append(".jpg");
			URL url = URLFactory.url(sb.toString());
			return url;
		}
	});

	return new LevelSet(params);
   }
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:34,代码来源:MagneticAnomaliesLayer.java


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