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

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

?? polygongeometry.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// **********************************************************************// // <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/omGraphics/geom/PolygonGeometry.java,v $// $RCSfile: PolygonGeometry.java,v $// $Revision: 1.4.2.2 $// $Date: 2005/08/09 21:17:59 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.omGraphics.geom;import java.awt.Point;import java.awt.geom.GeneralPath;import java.io.Serializable;import java.util.ArrayList;import com.bbn.openmap.omGraphics.OMGeometry;import com.bbn.openmap.omGraphics.OMGraphic;import com.bbn.openmap.proj.DrawUtil;import com.bbn.openmap.proj.ProjMath;import com.bbn.openmap.proj.Projection;import com.bbn.openmap.util.Debug;/** * Graphic object that represents a polygon. * <p> * All of the OMGraphics are moving to having their internal * representation as java.awt.Shape objects. Unfortunately, this has * the side effect of slowing OMPolys down, because the way that the * projection classes handle transformations cause more objects to be * allocated and more loops to be run through. So, by default, the * OMPoly does NOT use Shape objects internally, to keep layers that * throw down many, many polys running quickly. If you want to do some * spatial analysis on an OMPoly, call setDoShapes(true) on it, then * generate(Projection), and then call getShapes() to get the * java.awt.Shape objects for the poly. You can then run the different * Shape spatial analysis methods on the Shape objects. *  * <h3>NOTES:</h3> * <ul> * <li>See the <a * href="../../../../com.bbn.openmap.proj.Projection.html#poly_restrictions"> * RESTRICTIONS </a> on Lat/Lon polygons/polylines. Not following the * guidelines listed may result in ambiguous/undefined shapes! Similar * assumptions apply to the other vector graphics that we define: * circles, ellipses, rects, lines. * <li>LatLon OMPolys store latlon coordinates internally in radian * format for efficiency in projecting. Subclasses should follow this * model. * <li>Holes in the poly are not supported. If you want holes, use * multiple PolyGeometrys in a OMGeometryList. * <p> * </ul> * <h3>TODO:</h3> * <ul> * <li>Polar filled-polygon correction for Cylindrical projections * (like OMCircle). * </ul> */public abstract class PolygonGeometry extends BasicGeometry implements        Serializable, OMGeometry {    /** Internal array of projected x coordinate arrays. */    protected int[][] xpoints = new int[0][0];    /** Internal array of projected y coordinate arrays. */    protected int[][] ypoints = new int[0][0];    /**     * Whether it is a polygon, as opposed to a polyline. Should be a     * polygon, since that is what is being created. The     * PolylineGeometry subclasses set this to false.     */    protected boolean isPolygon = true;    /**     * Flag for telling the PolygonGeometry to use the Shape objects     * to represent itself internally. See intro for more info.     */    protected boolean doShapes = true;    protected PolygonGeometry() {}    public void setDoShapes(boolean set) {        doShapes = set;    }    public boolean getDoShapes() {        return doShapes;    }    protected void setIsPolygon(boolean set) {        isPolygon = set;    }    public boolean getIsPolygon() {        return isPolygon;    }    /**     * Since OMPoly has the option to not create a Shape, this method     * is here to create it if it is asked for. The OMPoly needs to be     * generated.     */    protected abstract void createShape();    /**     * Return the shortest distance from the graphic to an XY-point.     * This works if generate() has been successful.     *      * @param x horizontal pixel location.     * @param y vertical pixel location.     * @return the distance of the object to the location given.     */    public float distance(int x, int y) {        if (shape != null) {            return super.distance(x, y);        }        // If shape is null, then we have to do things the old way.        float temp, distance = Float.POSITIVE_INFINITY;        if (getNeedToRegenerate()) {            return distance;        }        // safety: grab local reference of projected points        int[][] xpts = xpoints;        int[][] ypts = ypoints;        int[] _x, _y;        int len = xpts.length;        for (int i = 0; i < len; i++) {            _x = xpts[i];            _y = ypts[i];            // check if point inside polygon            if (DrawUtil.inside_polygon(_x, _y, x, y))                return 0f; // close as can be            // get the closest point            temp = DrawUtil.closestPolyDistance(_x, _y, x, y, false);            if (temp < distance)                distance = temp;        }        return distance;    }    /**     * Get the array of java.awt.Shape objects that represent the     * projected graphic. The array will contain more than one Shape     * object of the object wraps around the earth and needs to show     * up in more than one place on the map.     * <p>     *      * The java.awt.Shape object gives you the ability to do a little     * spatial analysis on the graphics.     *      * @return java.awt.Shape[], or null if the graphic needs to be     *         generated with the current map projection, or null if     *         the OMGeometry hasn't been updated to use Shape objects     *         for its internal representation.     */    public GeneralPath getShape() {        if (shape == null && !getNeedToRegenerate() && !doShapes) {            // Since polygons have the option of not creating shape            // objects, should create one if asked.            createShape();        }        return shape;    }    public static class LL extends PolygonGeometry {        /** raw float lats and lons stored internally in radians. */        protected float[] rawllpts = null;        /**         * Number of segments to draw (used only for         * LINETYPE_GREATCIRCLE or LINETYPE_RHUMB lines).         */        protected int nsegs = -1;        /**         * Create an OMPoly from a list of float lat/lon pairs.         * <p>         * NOTES:         * <ul>         * <li>llPoints array is converted into radians IN PLACE for         * more efficient handling internally if it's not already in         * radians! For even better performance, you should send us an         * array already in radians format!         * <li>If you want the poly to be connected (as a polygon),         * you need to ensure that the first and last coordinate pairs         * are the same.         * </ul>         *          * @param llPoints array of lat/lon points, arranged lat, lon,         *        lat, lon, etc.         * @param units radians or decimal degrees. Use         *        OMGraphic.RADIANS or OMGraphic.DECIMAL_DEGREES         * @param lType line type, from a list defined in OMGraphic.         * @param nsegs number of segment points (only for         *        LINETYPE_GREATCIRCLE or LINETYPE_RHUMB line types,         *        and if &lt; 1, this value is generated internally)         */        public LL(float[] llPoints, int units, int lType, int nsegs) {            setLineType(lType);            setLocation(llPoints, units);            setNumSegs(nsegs);        }        /**         * Create an LL PolygonGeometry from a list of float lat/lon         * pairs.         * <p>         * NOTES:         * <ul>         * <li>llPoints array is converted into radians IN PLACE for         * more efficient handling internally if it's not already in         * radians! For even better performance, you should send us an         * array already in radians format!         * <li>If you want the poly to be connected (as a polygon),         * you need to ensure that the first and last coordinate pairs         * are the same.         * </ul>         *          * @param llPoints array of lat/lon points, arranged lat, lon,         *        lat, lon, etc.         * @param units radians or decimal degrees. Use         *        OMGraphic.RADIANS or OMGraphic.DECIMAL_DEGREES         * @param lType line type, from a list defined in OMGraphic.         */        public LL(float[] llPoints, int units, int lType) {            this(llPoints, units, lType, -1);        }        /**         * Set an OMPoly from a list of float lat/lon pairs.         * <p>         * NOTES:         * <ul>         * <li>llPoints array is converted into radians IN PLACE for         * more efficient handling internally if it's not already in         * radians! If you don't want the array to be changed, send in         * a copy.         * <li>If you want the poly to be connected (as a polygon),         * you need to ensure that the first and last coordinate pairs         * are the same.         * </ul>         * This is for RENDERTYPE_LATLON polys.         *          * @param llPoints array of lat/lon points, arranged lat, lon,         *        lat, lon, etc.         * @param units radians or decimal degrees. Use         *        OMGraphic.RADIANS or OMGraphic.DECIMAL_DEGREES         */        public void setLocation(float[] llPoints, int units) {            if (units == OMGraphic.DECIMAL_DEGREES) {                ProjMath.arrayDegToRad(llPoints);            }            rawllpts = llPoints;            setNeedToRegenerate(true);        }        /**         * Return the rawllpts array. NOTE: this is an unsafe method         * to access the rawllpts array. Use with caution. These are         * RADIANS!         *          * @return float[] rawllpts of lat, lon, lat, lon         */        public float[] getLatLonArray() {            return rawllpts;        }        /**         * Set the number of subsegments for each segment in the poly.         * (This is only for LINETYPE_GREATCIRCLE or LINETYPE_RHUMB         * line types, and if &lt; 1, this value is generated         * internally).         *          * @param nsegs number of segment points         */        public void setNumSegs(int nsegs) {            this.nsegs = nsegs;        }        /**         * Get the number of subsegments for each segment in the poly.         * (This is only for LINETYPE_GREATCIRCLE or LINETYPE_RHUMB         * line types).         *          * @return int number of segment points         */        public int getNumSegs() {            return nsegs;        }        public boolean generate(Projection proj) {            int i, j;            shape = null;            if (proj == null) {                Debug.message("omgraphic",                        "OMPoly: null projection in generate!");                return false;            }            // polygon/polyline project the polygon/polyline.            // Vertices should already be in radians.            ArrayList vector = proj.forwardPoly(rawllpts,                    lineType,                    nsegs,                    isPolygon);            int size = vector.size();            if (!doShapes) {                xpoints = new int[(int) (size / 2)][0];                ypoints = new int[xpoints.length][0];            }            // We could call create shape, but this is more efficient.            for (i = 0, j = 0; i < size; i += 2, j++) {                if (doShapes) {                    GeneralPath gp = BasicGeometry.createShape((int[]) vector.get(i),                            (int[]) vector.get(i + 1),                            isPolygon);                    if (shape == null) {                        shape = gp;                    } else {                        ((GeneralPath) shape).append(gp, false);                    }                } else {                    xpoints[j] = (int[]) vector.get(i);                    ypoints[j] = (int[]) vector.get(i + 1);                }            }            setNeedToRegenerate(false);            return true;        }        protected void createShape() {            if (getNeedToRegenerate()) {                return;            }            int size = xpoints.length;            for (int i = 0; i < size; i++) {                GeneralPath gp = BasicGeometry.createShape(xpoints[i],                        ypoints[i],                        isPolygon);                if (shape == null) {                    shape = gp;                } else {                    ((GeneralPath) shape).append(gp, false);                }            }        }        public int getRenderType() {            return RENDERTYPE_LATLON;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av电影免费观看| 国产精品午夜春色av| 国产偷v国产偷v亚洲高清| 亚洲一区二区三区国产| 久久99精品国产麻豆婷婷| 在线亚洲一区观看| 久久久久九九视频| 秋霞电影一区二区| 色婷婷久久久亚洲一区二区三区| www亚洲一区| 爽好久久久欧美精品| 99久久精品国产一区二区三区 | 久久精品这里都是精品| 五月天国产精品| 日本高清不卡视频| 国产精品欧美极品| 国产麻豆精品在线观看| 91麻豆精品国产91久久久久久久久 | 偷拍与自拍一区| 色婷婷久久久亚洲一区二区三区 | 91免费版在线看| 欧美极品另类videosde| 久久99精品久久久久久| 欧美美女bb生活片| 亚洲主播在线观看| 91久久精品一区二区三| 亚洲视频免费在线观看| 成人18精品视频| 中文字幕在线不卡视频| 成人av网站在线| 国产精品色噜噜| 成人免费av网站| 国产精品女上位| av资源站一区| 亚洲色图第一区| 色婷婷久久综合| 一区二区三区四区亚洲| 欧美日韩欧美一区二区| 日韩黄色小视频| 26uuu欧美日本| 国产成人亚洲精品青草天美| 久久奇米777| 福利电影一区二区| 一区在线播放视频| 欧洲av一区二区嗯嗯嗯啊| 亚洲综合色自拍一区| 欧美二区在线观看| 麻豆一区二区在线| 久久免费视频色| 丰满放荡岳乱妇91ww| 亚洲欧洲国产日本综合| 欧美日韩精品一区二区三区蜜桃| 亚洲成人av资源| 精品国产乱码久久久久久夜甘婷婷 | 欧美在线视频全部完| 亚洲国产sm捆绑调教视频 | 免费在线看一区| 久久免费精品国产久精品久久久久| 国产一区二区三区免费观看| 中文字幕中文字幕一区| 欧美日韩日日夜夜| 国产成人在线视频免费播放| 亚洲精品免费在线观看| 日韩欧美一区在线| www.视频一区| 秋霞电影一区二区| 日韩一区有码在线| 欧美大片拔萝卜| 一本色道亚洲精品aⅴ| 捆绑紧缚一区二区三区视频| 国产精品美女久久久久aⅴ国产馆| 欧美亚洲愉拍一区二区| 国内久久婷婷综合| 亚洲一级二级三级| 欧美激情一区二区三区不卡| 欧美日韩和欧美的一区二区| 国产jizzjizz一区二区| 日韩电影在线一区| 国产精品国产成人国产三级| 欧美成人伊人久久综合网| 色偷偷88欧美精品久久久| 国产自产视频一区二区三区| 亚洲一二三区在线观看| 国产精品私房写真福利视频| 欧美一区二区久久久| 色综合天天综合在线视频| 国产在线国偷精品产拍免费yy| 夜夜精品视频一区二区| 国产精品无遮挡| 日韩精品在线一区二区| 欧美日韩精品综合在线| 91麻豆文化传媒在线观看| 国产成人免费视频网站| 久久精品国产一区二区三| 一区二区成人在线视频| 中文字幕亚洲视频| 中文字幕欧美三区| 2017欧美狠狠色| 日韩免费电影一区| 制服丝袜日韩国产| 欧美日韩在线电影| 91成人免费在线视频| 色婷婷综合久久久久中文一区二区| 国产一区高清在线| 九九九久久久精品| 久久成人18免费观看| 日本亚洲欧美天堂免费| 日本不卡一区二区三区高清视频| 亚洲自拍另类综合| 亚洲一级电影视频| 午夜伊人狠狠久久| 视频在线观看91| 日本在线播放一区二区三区| 亚洲一线二线三线视频| 亚洲一区在线观看视频| 午夜精品视频一区| 爽爽淫人综合网网站| 蜜臀国产一区二区三区在线播放| 午夜精品久久久久久久久久久| 亚洲电影在线播放| 日韩高清一级片| 日本特黄久久久高潮| 国内成人自拍视频| 粉嫩在线一区二区三区视频| 懂色av一区二区三区蜜臀| 成人亚洲一区二区一| 91蜜桃在线观看| 欧美精品一二三区| 欧美电影精品一区二区| 国产亚洲一区二区三区| 中文字幕中文乱码欧美一区二区 | 麻豆免费看一区二区三区| 久久国产成人午夜av影院| 国产成人啪午夜精品网站男同| 国产aⅴ精品一区二区三区色成熟| 成人一区二区视频| 色哟哟欧美精品| 日韩一区国产二区欧美三区| 国产v综合v亚洲欧| 91免费版在线| 欧美高清视频不卡网| 亚洲免费观看在线观看| 日日摸夜夜添夜夜添精品视频| 一区二区三区美女| 亚洲欧美日韩国产综合| 国产欧美日韩不卡| 亚洲精品乱码久久久久久| 蜜臀a∨国产成人精品| 国产成人aaa| 欧美日韩一级大片网址| 久久影音资源网| 亚洲在线中文字幕| 国产一区在线不卡| 欧美日韩在线播放| 久久精品视频免费| 亚洲444eee在线观看| 国产成人亚洲综合a∨婷婷图片| 欧美亚洲综合色| 国产亚洲精品久| 日韩福利电影在线| 97久久超碰国产精品| 欧美变态tickle挠乳网站| ...xxx性欧美| 极品美女销魂一区二区三区 | 中文字幕中文字幕一区| 秋霞影院一区二区| 一本久久a久久免费精品不卡| 91精品欧美综合在线观看最新| 1024国产精品| 国产麻豆一精品一av一免费| 欧美男女性生活在线直播观看| 国产精品妹子av| 国产一区二区影院| 日韩欧美在线网站| 日韩成人一区二区三区在线观看| 成人夜色视频网站在线观看| 欧美成人a视频| 视频一区二区三区在线| 欧美唯美清纯偷拍| 国产91在线观看丝袜| 欧美影院一区二区三区| 免费不卡在线视频| 97久久超碰国产精品电影| 久久综合色婷婷| 久久国产乱子精品免费女| 67194成人在线观看| 亚洲一区二区在线免费看| youjizz久久| 欧美国产成人精品| 国产麻豆精品一区二区| 久久综合色婷婷| 国产精品伊人色| 精品国产乱码久久久久久闺蜜| 免费成人在线视频观看| 中文字幕免费一区| 美女尤物国产一区| 色呦呦一区二区三区| 国产精品三级视频| 亚洲精品你懂的| 日韩欧美一区在线观看|