亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dmslatlonpoint.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
字號:
// **********************************************************************// // <copyright>// //  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source: /cvs/distapps/openmap/src/openmap/com/bbn/openmap/proj/coords/DMSLatLonPoint.java,v $// $RCSfile: DMSLatLonPoint.java,v $// $Revision: 1.3.2.1 $// $Date: 2004/10/14 18:27:38 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.proj.coords;import com.bbn.openmap.LatLonPoint;import com.bbn.openmap.util.Assert;/** * Encapsulates a latitude and longitude coordinate in degrees, * minutes and seconds as well as the sign. * <p> *  * Original code contributed by Colin Mummery * (colin_mummery@yahoo.com) */public class DMSLatLonPoint implements Cloneable {    private final static float MINUTE = 1 / 60.0f;    private final static float SECOND = 1 / 3600.0f;    /**     * Indicates if the latitude is negative, the actual int values     * are always positive.     */    public boolean lat_isnegative;    /**     * The number of degrees in the latitude.     */    public int lat_degrees;    /**     * The number of minutes in the latitude.     */    public int lat_minutes;    /**     * The number of seconds in the latitude.     */    public float lat_seconds;    /**     * Indicates if the longitude is negative, the actual int values     * are always positive.     */    public boolean lon_isnegative;    /**     * The number of degrees in the longitude.     */    public int lon_degrees;    /**     * The number of minutes in the longitude.     */    public int lon_minutes;    /**     * The number of seconds in the longitude.     */    public float lon_seconds;    /**     * Construct a default LatLonPoint with zero values.     */    public DMSLatLonPoint() {}    /**     * Construct a DMSLatLonPoint from raw int lat/lon. All parameters     * are checked for their validity.     *      * @param lat_isnegative boolean value indicating the sign of the     *        latitude     * @param lat_degrees integer number of degrees in latitude     * @param lat_minutes integer number of minutes in latitude     * @param lat_seconds float number of seconds in latitude     * @param lon_isnegative boolean value indicating the sign of the     *        longitude     * @param lon_degrees integer number of degrees in longitude     * @param lon_minutes integer number of minutes in longitude     * @param lon_seconds float number of seconds in longitude     */    public DMSLatLonPoint(boolean lat_isnegative, int lat_degrees,            int lat_minutes, float lat_seconds, boolean lon_isnegative,            int lon_degrees, int lon_minutes, float lon_seconds) {        this.lat_isnegative = lat_isnegative;        this.lat_degrees = (int) LatLonPoint.normalize_latitude(lat_degrees);        if (this.lat_degrees < 0) {            //can't have a negative value            this.lat_degrees = -this.lat_degrees;        }        this.lat_minutes = normalize_value(lat_minutes);        this.lat_seconds = normalize_value(lat_seconds);        this.lon_isnegative = lon_isnegative;        this.lon_degrees = (int) LatLonPoint.wrap_longitude(lon_degrees);        if (this.lon_degrees < 0) {            //can't have a negative value            this.lon_degrees = -this.lon_degrees;        }        this.lon_minutes = normalize_value(lon_minutes);        this.lon_seconds = normalize_value(lon_seconds);    }    /**     * Constructs a new DMSLatLonPoint given a LatLonPoint instance     *      * @param llp A LatLonPoint instance     */    public DMSLatLonPoint(LatLonPoint llp) {        getDMSLatLonPoint(llp, this);    }    /**     * A static method which takes an instance of a LatLongPoint and     * sets the correct values into an instance of DMSLatLonPoint.     *      * @param llp A LatLonPoint instance.     * @param dllp A DMSLatLonPoint instance.     */    static void getDMSLatLonPoint(LatLonPoint llp, DMSLatLonPoint dllp) {        //set everything to zero        dllp.lat_degrees = 0;        dllp.lat_minutes = 0;        dllp.lat_seconds = 0f;        dllp.lat_isnegative = false;        dllp.lon_degrees = 0;        dllp.lon_minutes = 0;        dllp.lon_seconds = 0f;        dllp.lon_isnegative = false;        //First do the latitude        float val = llp.getLatitude();        if (val < 0) {            dllp.lat_isnegative = true;            val = -val;        } //remove the sign but remember it        dllp.lat_degrees = (int) Math.floor((double) val);        if (val >= SECOND) {            //If it's less then a second then we assume zero...I            // guess            //we could round up            int deg = (int) val;            //take out the whole degrees            float rem = val - deg;            //Do we have anything left to convert to a minute            if (rem >= MINUTE) { //get the minutes                int min = (int) (rem * 60);                dllp.lat_minutes = min;                rem = rem - (min * MINUTE);            }            //Any seconds left?            if (rem >= SECOND) { //get the seconds                float sec = (rem * 3600f);                dllp.lat_seconds = sec;                rem = rem - (sec * SECOND);            }        } else {            dllp.lat_isnegative = false; //we don't want a negative                                         // zero        }        //Next repeat the code for longitude, easiest just to repeat        //it        val = llp.getLongitude();        if (val < 0) {            dllp.lon_isnegative = true;            val = -val;        }        dllp.lon_degrees = (int) Math.floor((double) val);        if (val >= SECOND) {            int deg = (int) val;            float rem = val - deg;            if (rem >= MINUTE) {                int min = (int) (rem * 60);                dllp.lon_minutes = min;                rem = rem - (min * MINUTE);            }            if (rem >= SECOND) {                float sec = rem * 3600f;                dllp.lon_seconds = sec;                rem = rem - (sec * SECOND);            }        } else {            dllp.lon_isnegative = false;        }    }    /**     * Return a LatLonPoint from this DMSLatLonPoint. The LatLonPoint     * is allocated here.     *      * @return LatLonPoint, full of decimal degrees.     */    public LatLonPoint getLatLonPoint() {        return getLatLonPoint(null);    }    /**     * Return a LatLonPoint from this DMSLatLonPoint. The LatLonPoint     * is allocated here if the llp is null. If it's not null, then     * the llp is loaded with the proper values.     *      * @param llp the LatLonPoint to load up.     * @return LatLonPoint, full of decimal degrees.     */    public LatLonPoint getLatLonPoint(LatLonPoint llp) {        float lat = getDecimalLatitude();        float lon = getDecimalLongitude();        if (llp == null) {            return new LatLonPoint(lat, lon);        } else {            llp.setLatLon(lat, lon);            return llp;        }    }    /**     * Returns the latitude as decimal degrees.     *      * @return A float value for the latitude     */    public float getDecimalLatitude() {        float val = (lat_degrees + (lat_minutes * MINUTE) + (lat_seconds * SECOND));        return (lat_isnegative) ? -val : val;    }    /**     * Returns the longitude as decimal degrees.     *      * @return A float value for the longitude     */    public float getDecimalLongitude() {        float val = (lon_degrees + (lon_minutes * MINUTE) + (lon_seconds * SECOND));        return (lon_isnegative) ? -val : val;    }    /**     * Returns a string representation of the object.     *      * @return String representation     */    public String toString() {        return "DMSLatLonPoint[lat_isnegative = " + lat_isnegative                + ", lat_degrees = " + lat_degrees + ", lat_minutes = "                + lat_minutes + ", lat_seconds = " + lat_seconds                + ", lon_isnegative = " + lon_isnegative + ", lon_degrees = "                + lon_degrees + ", lon_minutes = " + lon_minutes                + ", lon_seconds = " + lon_seconds + "]";    }    /**     * Set DMSLatLonPoint. Sets the current instance values to be the     * same as another DMSLatLonPoint instance.     *      * @param llpt DMSLatLonPoint     */    public void setDMSLatLon(DMSLatLonPoint llpt) {        lat_isnegative = llpt.lat_isnegative;        lat_degrees = llpt.lat_degrees;        lat_minutes = llpt.lat_minutes;        lat_seconds = llpt.lat_seconds;        lon_isnegative = llpt.lon_isnegative;        lon_degrees = llpt.lon_degrees;        lon_minutes = llpt.lon_minutes;        lon_seconds = llpt.lon_seconds;    }    /**     * Clone the DMSLatLonPoint.     *      * @return clone     */    public Object clone() {        try {            return super.clone();        } catch (CloneNotSupportedException e) {            Assert.assertExp(false, "DMSLatLonPoint: internal error!");            return null;// statement not reached        }    }    /**     * Determines whether two DMSLatLonPoints are exactly equal.     *      * @param obj Object     * @return boolean     */    public boolean equals(Object obj) {        if (obj instanceof DMSLatLonPoint) {            DMSLatLonPoint pt = (DMSLatLonPoint) obj;            return (pt.lat_isnegative == lat_isnegative                    && pt.lat_degrees == lat_degrees                    && pt.lat_minutes == lat_degrees                    && pt.lat_seconds == pt.lat_seconds                    && pt.lon_isnegative == lon_isnegative                    && pt.lon_degrees == lon_degrees                    && pt.lon_minutes == pt.lon_minutes && pt.lon_seconds == lon_seconds);        }        return false;    }    /**     * Sets the minutes and seconds to something sane.     *      * @param val an int value for the minutes or seconds     * @return int value normalized     */    final public static int normalize_value(int val) {        val = val % 60;        if (val < 0) {            val += 60;        }        return val;    }    /**     * Sets the minutes and seconds to something sane.     *      * @param val an float value for the minutes or seconds     * @return float value normalized     */    final public static float normalize_value(float val) {        val = val % 60f;        if (val < 0f) {            val += 60f;        }        return val;    }    /**     * Generate a hash value for the point. Hash by spreading the     * values across a 32 bit int, ignoring the sign allow 8 bits (max     * 255) for degrees, 7 bits (max 127) for (minutes + seconds) so     * the total is 30 bits.     *      * @return An int hash value representing the point.     */    public int hashCode() {        return (lat_degrees | lon_degrees << 8                | (lat_minutes + (int) lat_seconds) << 16 | (lon_minutes + (int) lon_seconds) << 23);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91免费在线看| 久久午夜老司机| 日韩你懂的在线观看| 中文在线免费一区三区高中清不卡| 日韩理论在线观看| 精品综合免费视频观看| 91浏览器打开| 欧美国产精品一区二区| 蜜桃av噜噜一区| 欧洲av在线精品| 国产精品热久久久久夜色精品三区| 精品中文字幕一区二区小辣椒| 99re这里都是精品| 久久综合色之久久综合| 天天av天天翘天天综合网色鬼国产| 成人一区二区三区| 久久综合久久鬼色| 欧美aaaaa成人免费观看视频| 日本韩国一区二区三区| 中文字幕在线观看一区| 国产综合色精品一区二区三区| 欧美高清视频不卡网| 亚洲一区自拍偷拍| 一本久久精品一区二区| 国产精品国产三级国产普通话99 | 性久久久久久久| 91在线播放网址| 成人免费小视频| 成人性生交大片免费看在线播放 | 欧美日韩三级在线| 亚洲欧美区自拍先锋| www.性欧美| 国产精品国产精品国产专区不蜜| 国产suv一区二区三区88区| 精品国产免费人成在线观看| 日本亚洲一区二区| 欧美肥胖老妇做爰| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美精品在线观看播放| 天天免费综合色| 666欧美在线视频| 日本美女视频一区二区| 91精品午夜视频| 美女视频一区二区三区| 日韩三级在线观看| 国产精品自拍网站| 亚洲国产电影在线观看| 99久久久精品| 亚洲一区二区三区四区五区黄| 91黄色免费观看| 调教+趴+乳夹+国产+精品| 欧美一级艳片视频免费观看| 青青草国产精品97视觉盛宴| 精品三级av在线| 岛国精品在线观看| 亚洲国产精品久久人人爱| 在线不卡欧美精品一区二区三区| 日本va欧美va欧美va精品| 久久影音资源网| 99久久99久久精品免费观看| 一区二区三区在线免费| 欧美一区二区三区在线观看视频 | 亚洲一区二区视频在线观看| 在线91免费看| 国产成人精品网址| 亚洲免费在线看| 欧美一级午夜免费电影| 成人丝袜高跟foot| 午夜精品久久久久久久99水蜜桃 | 国产一区激情在线| 成人免费一区二区三区视频| 欧美日韩激情在线| 国产福利一区二区三区视频在线| 日韩毛片高清在线播放| 欧美成人精品1314www| 不卡电影一区二区三区| 日韩国产欧美三级| 国产精品久久久久久久久动漫 | 亚洲一区在线观看免费观看电影高清 | 97超碰欧美中文字幕| 美女在线一区二区| 中文字幕日韩精品一区| 日韩三级视频在线看| 91麻豆蜜桃一区二区三区| 久久精品av麻豆的观看方式| 亚洲人快播电影网| 欧美精品一区二区三区在线| 欧美亚洲另类激情小说| 国产精品1024| 日韩制服丝袜av| 亚洲制服丝袜在线| 国产精品久久看| 久久在线观看免费| 欧美一区二区成人| 欧美久久免费观看| 色欧美片视频在线观看| 高清在线不卡av| 国产一区二区三区综合| 午夜av一区二区三区| 亚洲天堂精品在线观看| 国产亚洲一区二区三区| 日韩欧美www| 欧美精品粉嫩高潮一区二区| 色婷婷久久久综合中文字幕| 福利电影一区二区三区| 国产一区二区网址| 久久精品国产免费| 奇米四色…亚洲| 日韩福利视频导航| 日本aⅴ免费视频一区二区三区 | 亚洲精品一区二区三区影院| 欧美夫妻性生活| 91麻豆精品国产综合久久久久久 | 亚洲人成影院在线观看| 中文字幕欧美国产| 国产欧美日韩精品一区| 国产日韩欧美综合在线| 久久色在线观看| 国产偷v国产偷v亚洲高清| 久久综合九色综合97婷婷女人 | 另类中文字幕网| 日本欧美在线观看| 麻豆久久久久久久| 国产在线精品一区二区夜色| 久久er精品视频| 国产成人小视频| 成人av小说网| 欧洲中文字幕精品| 欧美日韩成人综合在线一区二区| 欧美日韩国产小视频| 51精品国自产在线| 精品三级在线观看| 国产精品三级在线观看| 亚洲精品美国一| 午夜在线成人av| 97精品久久久午夜一区二区三区| 91女人视频在线观看| 在线观看亚洲成人| 91精品久久久久久久99蜜桃| 日韩精品一区二区三区视频在线观看 | 日韩一区二区三区电影在线观看| 欧美成人三级在线| 欧美激情在线免费观看| 亚洲欧美日韩久久精品| 亚洲午夜电影网| 久久99精品国产.久久久久久| 国产精品亚洲人在线观看| 成人动漫av在线| 欧美日韩国产美| 欧美精品一区二区三区高清aⅴ| 日本一区二区成人| 亚洲综合小说图片| 国产一区二区三区四区五区美女| 成人av资源在线观看| 欧美美女网站色| 国产日韩欧美a| 热久久国产精品| 99久久精品国产网站| 日韩亚洲欧美高清| 亚洲色图第一区| 久88久久88久久久| 在线亚洲人成电影网站色www| 日韩丝袜情趣美女图片| 亚洲色图都市小说| 国产一区二区在线观看视频| 欧洲视频一区二区| 久久久久综合网| 无吗不卡中文字幕| 成人免费毛片app| 91精品国产一区二区| 亚洲日本乱码在线观看| 久久99国产精品久久| 色88888久久久久久影院野外| 精品盗摄一区二区三区| 午夜激情一区二区三区| 色综合久久中文字幕综合网| 久久午夜电影网| 免费三级欧美电影| 欧美午夜电影网| 中文字幕亚洲欧美在线不卡| 国产在线播放一区| 日韩一级欧美一级| 午夜亚洲福利老司机| 一本大道av一区二区在线播放| 欧美激情一区二区三区四区| 免费成人结看片| 欧美日韩五月天| 亚洲国产日产av| 在线观看一区不卡| 国产麻豆精品95视频| 欧美一区二区视频在线观看| 亚洲一区二区视频| 91久久久免费一区二区| 亚洲女子a中天字幕| 成人美女视频在线看| 日本一区免费视频| 国产精品一区二区免费不卡| 精品国产网站在线观看| 免费在线观看不卡| 91精品国产福利|