⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 elevation.java

📁 esri的ArcGIS Server超级学习模板程序(for java)
💻 JAVA
字号:
package com.esri.solutions.jitk.services.elevation;

/**
 * Contains the results from an Elevation Calculator operation.
 * The elevation value will be in FEET or METERS.  The Unit property
 * will indicate which type it is in.  Refer to the Constant Values
 * for {@link #ELEVATION_UNIT_FEET} and {@link #ELEVATION_UNIT_METERS}
 * for valid values of the Unit property.
 */
public class Elevation implements java.io.Serializable {

	/**
	 * Indicates that the elevation value is in Feet.
	 */
	public static final int ELEVATION_UNIT_FEET = 1;
	
	/**
	 * Indicates that the elevation value is in Meters.
	 */
	public static final int ELEVATION_UNIT_METERS = 2;
	
	/**
	 * Serialization ID.
	 */
	private static final long serialVersionUID = -5906290760342709578L;

	/**
	 * Elevation value.
	 */
	private double m_elevation;
	
	/**
	 * Elevation Unit.  Refer to ELEVATION_UNIT constants.
	 */
	private int m_unit;
	
	/**
	 * Returns the elevation value.  The elevation will be in the Units
	 * specified by calling {@link #getUnit()}.  
	 * 
	 * @return Elevation value.
	 */
	public double getElevation () {
		return m_elevation;
	}
	
	/**
	 * Returns the Unit that the Elevation value is in.  Values can be
	 * determined by looking at the ELEVATION_UNIT constants.
	 * 
	 * @return Unit of Measure
	 * 
	 * @see #ELEVATION_UNIT_FEET
	 * @see #ELEVATION_UNIT_METERS
	 */
	public int getUnit () {
		return m_unit;
	}

	/**
	 * Create an Elevation object where the elevation value is
	 * in FEET measurement.
	 * 
	 * @param value		Elevation value.
	 * @return Elevation object where the elevation value is in
	 * FEET measurement.
	 */
	public static Elevation elevationAsFeet (double value) {
		Elevation elevation = new Elevation();
		elevation.m_elevation = value;
		elevation.m_unit = ELEVATION_UNIT_FEET;
		return elevation;
	}
	
	/**
	 * Create an Elevation object where the elevation value is
	 * in METERS measurement.
	 * 
	 * @param value		Elevation value.
	 * @return Elevation object where the elevation value is in
	 * METERS measurement.
	 */
	public static Elevation elevationAsMeters (double value) {
		Elevation elevation = new Elevation ();
		elevation.m_elevation = value;
		elevation.m_unit = ELEVATION_UNIT_METERS;
		return elevation;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -