📄 utmprojectionloader.java
字号:
package com.bbn.openmap.proj;import java.util.Properties;import com.bbn.openmap.LatLonPoint;import com.bbn.openmap.util.Debug;import com.bbn.openmap.util.PropUtils;public class UTMProjectionLoader extends BasicProjectionLoader { public static final String ZONE_NUMBER = "ZONE_NUMBER"; public static final String ZONE_LETTER = "ZONE_LETTER"; public static final String ELLIPSOID = "ELLIPSOID"; public UTMProjectionLoader() { super(UTMProjection.class, "UTM Projection", "UTM Projection"); } public Projection create(Properties props) throws ProjectionException { try { LatLonPoint center = (LatLonPoint) props.get(ProjectionFactory.CENTER); float scale = PropUtils.floatFromProperties(props, ProjectionFactory.SCALE, 10000000); int height = PropUtils.intFromProperties(props, ProjectionFactory.HEIGHT, 100); int width = PropUtils.intFromProperties(props, ProjectionFactory.WIDTH, 100); int type = UTMProjection.UTMType; int zone_number = PropUtils.intFromProperties(props, ZONE_NUMBER, 0); char zone_letter = ((String) props.get(ZONE_LETTER)).charAt(0); boolean isnorthern = (zone_letter == 'N'); Ellipsoid ellps = (Ellipsoid) props.get(ELLIPSOID); return new UTMProjection(center, scale, width, height, type, zone_number, isnorthern, ellps); } catch (Exception e) { if (Debug.debugging("proj")) { Debug.output("UTMProjectionLoader: problem creating UTM projection " + e.getMessage()); e.printStackTrace(); } } throw new ProjectionException("UTMProjectionLoader: problem creating UTM projection"); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -