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

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

?? shapefile.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/layer/shape/ShapeFile.java,v $// $RCSfile: ShapeFile.java,v $// $Revision: 1.2.2.2 $// $Date: 2005/08/09 21:17:47 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.layer.shape;import java.io.File;import java.io.IOException;import java.io.RandomAccessFile;import java.util.Vector;import com.bbn.openmap.util.Debug;/** * Class representing an ESRI Shape File. * <p> * <H2>Usage:</H2> * <DT>java com.bbn.openmap.layer.shape.ShapeFile -v shapeFile</DT> * <DD>Verifies a shape file.</DD> * <p> * <DT>java com.bbn.openmap.layer.shape.ShapeFile -a destShapeFile * srcShapeFile</DT> * <DD>Appends records from srcShapeFile to destShapeFile.</DD> * <p> * <DT>java com.bbn.openmap.layer.shape.ShapeFile shapeFile</DT> * <DD>Prints information about the header and the number of records. * </DD> * <p> *  * @author Tom Mitchell <tmitchell@bbn.com> * @author Ray Tomlinson * @author Geoffrey Knauth * @version $Revision: 1.2.2.2 $ $Date: 2005/08/09 21:17:47 $ */public class ShapeFile extends ShapeUtils {    /** A Shape File's magic number. */    public static final int SHAPE_FILE_CODE = 9994;    /** The currently handled version of Shape Files. */    public static final int SHAPE_FILE_VERSION = 1000;    /** A default record size. Automatically increased on demand. */    public static final int DEFAULT_RECORD_BUFFER_SIZE = 50000;    /** The read/write class for shape files. */    protected RandomAccessFile raf;    /** The buffer that holds the 100 byte header. */    protected byte header[];    /** Holds the length of the file, in bytes. */    protected long fileLength;    /** Holds the version of the file, as an int. */    protected int fileVersion;    /** Holds the shape type of the file. */    protected int fileShapeType;    /** Holds the bounds of the file (four doubles). */    protected ESRIBoundingBox fileBounds;    /** A buffer for current record's header. */    protected byte recHdr[];    /** A buffer for the current record's data. */    protected byte recBuf[];    /**     * Construct a <code>ShapeFile</code> from a file name.     *      * @exception IOException if something goes wrong opening or     *            reading the file.     */    public ShapeFile(String name) throws IOException {        raf = new RandomAccessFile(name, "rw");        recHdr = new byte[ShapeUtils.SHAPE_FILE_RECORD_HEADER_LENGTH];        recBuf = new byte[DEFAULT_RECORD_BUFFER_SIZE];        initHeader();    }    /**     * Construct a <code>ShapeFile</code> from the given     * <code>File</code>.     *      * @param file A file object representing an ESRI Shape File     *      * @exception IOException if something goes wrong opening or     *            reading the file.     */    public ShapeFile(File file) throws IOException {        this(file.getPath());    }    /**     * Reads or writes the header of a Shape file. If the file is     * empty, a blank header is written and then read. If the file is     * not empty, the header is read.     * <p>     * After this function runs, the file pointer is set to byte 100,     * the first byte of the first record in the file.     *      * @exception IOException if something goes wrong reading or     *            writing the shape file     */    protected void initHeader() throws IOException {        int result = raf.read();        if (result == -1) {            // File is empty, write a new header into the file            writeHeader();        }        readHeader();    }    /**     * Writes a blank header into the shape file.     *      * @exception IOException if something goes wrong writing the     *            shape file     */    protected void writeHeader() throws IOException {        header = new byte[SHAPE_FILE_HEADER_LENGTH];        writeBEInt(header, 0, SHAPE_FILE_CODE);        writeBEInt(header, 24, 50); // empty shape file size in 16 bit        // words        writeLEInt(header, 28, SHAPE_FILE_VERSION);        writeLEInt(header, 32, SHAPE_TYPE_NULL);        writeLEDouble(header, 36, 0.0);        writeLEDouble(header, 44, 0.0);        writeLEDouble(header, 52, 0.0);        writeLEDouble(header, 60, 0.0);        raf.seek(0);        raf.write(header, 0, SHAPE_FILE_HEADER_LENGTH);    }    /**     * Reads and parses the header of the file. Values from the header     * are stored in the fields of this class.     *      * @exception IOException if something goes wrong reading the file     * @see #header     * @see #fileVersion     * @see #fileLength     * @see #fileShapeType     * @see #fileBounds     */    protected void readHeader() throws IOException {        header = new byte[ShapeUtils.SHAPE_FILE_HEADER_LENGTH];        raf.seek(0); // Make sure we're at the beginning of        // the file        raf.read(header, 0, ShapeUtils.SHAPE_FILE_HEADER_LENGTH);        int fileCode = ShapeUtils.readBEInt(header, 0);        if (fileCode != SHAPE_FILE_CODE) {            throw new IOException("Invalid file code, "                    + "probably not a shape file");        }        fileVersion = ShapeUtils.readLEInt(header, 28);        if (fileVersion != SHAPE_FILE_VERSION) {            throw new IOException("Unable to read shape files with version "                    + fileVersion);        }        fileLength = ShapeUtils.readBEInt(header, 24);        fileLength *= 2; // convert from 16-bit words to 8-bit                            // bytes        fileShapeType = ShapeUtils.readLEInt(header, 32);        fileBounds = ShapeUtils.readBox(header, 36);    }    /**     * Returns the length of the file in bytes.     *      * @return the file length     */    public long getFileLength() {        return fileLength;    }    /**     * Returns the version of the file. The only currently supported     * version is 1000 (which represents version 1).     *      * @return the file version     */    public int getFileVersion() {        return fileVersion;    }    /**     * Returns the shape type of the file. Shape files do not mix     * shape types; all the shapes are of the same type.     *      * @return the file's shape type     */    public int getShapeType() {        return fileShapeType;    }    /**     * Sets the shape type of the file. If the file has a shape type     * already, it cannot be set. If it does not have a shape type, it     * is set and written to the file in the header.     * <p>     * Shape types are enumerated in the class ShapeUtils.     *      * @param newShapeType the new shape type     * @exception IOException if something goes wrong writing the file     * @exception IllegalArgumentException if file already has a shape     *            type     * @see ShapeUtils     */    public void setShapeType(int newShapeType) throws IOException,            IllegalArgumentException {        if (fileShapeType == SHAPE_TYPE_NULL) {            fileShapeType = newShapeType;            long filePtr = raf.getFilePointer();            writeLEInt(header, 32, fileShapeType);            raf.seek(0);            raf.write(header, 0, 100);            raf.seek(filePtr);        } else {            throw new IllegalArgumentException("file already has a valid"                    + " shape type: " + fileShapeType);        }    }    /**     * Returns the bounding box of this shape file. The bounding box     * is the smallest rectangle that encloses all the shapes in the     * file.     *      * @return the bounding box     */    public ESRIBoundingBox getBoundingBox() {        return fileBounds;    }    /**     * Returns the next record from the shape file as an     * <code>ESRIRecord</code>. Each successive call gets the next     * record. There is no way to go back a record. When there are no     * more records, <code>null</code> is returned.     *      * @return a record, or null if there are no more records     * @exception IOException if something goes wrong reading the file     */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美人动与zoxxxx乱| 亚洲一二三四久久| 69久久99精品久久久久婷婷| 99精品视频在线免费观看| 国产成都精品91一区二区三| 国产成人综合网站| 国产精品小仙女| 欧美精品自拍偷拍动漫精品| 一本一道综合狠狠老| 97精品国产露脸对白| 91捆绑美女网站| 欧美又粗又大又爽| 欧美伊人久久久久久午夜久久久久| 91亚洲午夜精品久久久久久| 欧洲精品视频在线观看| 精品视频免费看| 欧美一级日韩一级| 久久只精品国产| 久久精品夜色噜噜亚洲aⅴ| 中文字幕色av一区二区三区| 亚洲欧美视频一区| 男人的天堂亚洲一区| 国产中文字幕精品| 色综合久久中文字幕综合网| 欧美日韩精品二区第二页| 精品成人佐山爱一区二区| 亚洲欧洲日韩综合一区二区| 亚洲国产欧美在线| 国产精品一级片在线观看| 99精品视频一区| 日韩免费性生活视频播放| 国产精品久久久久7777按摩| 亚洲高清免费观看高清完整版在线观看| 日欧美一区二区| 成人av资源网站| 日韩欧美资源站| 国产精品高潮久久久久无| 日韩在线播放一区二区| thepron国产精品| 51精品视频一区二区三区| 国产精品免费aⅴ片在线观看| 亚洲国产一区二区三区| 国产成人h网站| 欧美军同video69gay| 国产精品你懂的在线欣赏| 日本午夜一区二区| 99re热视频精品| 欧美精品一区二区精品网| 亚洲午夜电影网| 成人晚上爱看视频| 日韩免费看的电影| 亚洲国产一区视频| 91免费看`日韩一区二区| 久久综合给合久久狠狠狠97色69| 亚洲一区二区三区四区五区黄| 国产一区二区三区高清播放| 欧美一区二区三区公司| 一区二区三区在线视频免费| 成人av在线网| 久久亚洲一级片| 久久99最新地址| 日韩一级完整毛片| 丝袜美腿亚洲色图| 欧美三级在线看| 亚洲欧美日韩中文字幕一区二区三区| 激情欧美日韩一区二区| 91精品久久久久久久99蜜桃| 一区二区欧美国产| 一本一本大道香蕉久在线精品 | 日本不卡一区二区三区| a在线播放不卡| 国产精品白丝在线| 亚洲mv在线观看| 国产精品一区免费视频| 精品久久久久av影院| 日本欧美一区二区三区乱码| 欧美视频精品在线| 久草这里只有精品视频| 这里只有精品电影| 午夜精品久久一牛影视| 91精品国产综合久久精品麻豆| 亚洲va欧美va国产va天堂影院| 精品婷婷伊人一区三区三| 亚洲女与黑人做爰| 欧美日韩国产综合久久| 久久99久久久久久久久久久| 精品少妇一区二区三区在线视频| 精久久久久久久久久久| 久久久精品国产免大香伊| 国产美女在线观看一区| 国产欧美一区二区三区网站| 国产精品影视天天线| 日本一区二区高清| 91天堂素人约啪| 亚洲第一av色| 久久亚洲精品小早川怜子| 菠萝蜜视频在线观看一区| 亚洲精品videosex极品| 91精品午夜视频| 国产一区二区三区免费在线观看| 国产精品剧情在线亚洲| 欧美专区在线观看一区| 日韩精品欧美精品| 久久久久88色偷偷免费| 91浏览器入口在线观看| 日韩福利视频网| 国产精品久久久久久亚洲伦 | 美女在线视频一区| 久久综合久久综合九色| 色婷婷综合久久| 性做久久久久久久免费看| 亚洲人成在线播放网站岛国| 91欧美一区二区| 亚洲aaa精品| 国产日本欧美一区二区| 欧美性生活久久| 国产米奇在线777精品观看| 亚洲福利视频一区二区| 久久久久久久久久久黄色| 欧美性色黄大片| 粉嫩aⅴ一区二区三区四区| 午夜视频久久久久久| 国产精品久久久久久久午夜片| 欧美日韩国产a| 成年人网站91| 国产精品18久久久| 亚洲一区二区三区四区五区黄| 国产精品午夜电影| 国产精品毛片a∨一区二区三区| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲最新视频在线观看| 欧美激情一二三区| 国产精品美女久久久久久久久久久| 欧美妇女性影城| 日韩精品一区二区三区三区免费| 国产在线播放一区三区四| 精品在线观看视频| 欧美国产日韩精品免费观看| 国产精品久久久久久久久图文区| 中文字幕亚洲一区二区av在线| 亚洲男人电影天堂| 秋霞午夜鲁丝一区二区老狼| 国产一区二区毛片| 91精品福利视频| 欧美一区二区三区视频在线观看| 欧美精品一区男女天堂| 国产精品网站在线观看| 午夜精品久久久久影视| 国内精品免费在线观看| 色噜噜夜夜夜综合网| 欧美一区二区成人6969| 一区精品在线播放| 日韩精品一二三| 成人动漫一区二区在线| 日韩一区二区三区四区| 中文字幕在线不卡| 奇米影视7777精品一区二区| 成人黄色大片在线观看| 欧美一区永久视频免费观看| 国产精品三级av| 另类小说一区二区三区| 97精品久久久午夜一区二区三区| 欧美一区二视频| 一区二区三区日韩精品| 久久97超碰色| 欧美日韩亚洲不卡| 国产精品激情偷乱一区二区∴| 免费成人在线视频观看| 欧美中文字幕一二三区视频| 国产欧美精品区一区二区三区| 视频一区二区中文字幕| 色婷婷一区二区三区四区| 久久精品日产第一区二区三区高清版| 亚洲福利视频三区| 99精品黄色片免费大全| 欧美国产欧美综合| 久久99久久99小草精品免视看| 欧美日韩第一区日日骚| 亚洲女厕所小便bbb| 成人av在线资源网站| 久久久欧美精品sm网站| 美女性感视频久久| 欧美蜜桃一区二区三区| 亚洲靠逼com| www.激情成人| 国产精品网曝门| 国产不卡在线一区| 国产丝袜欧美中文另类| 国内成人免费视频| 欧美变态口味重另类| 琪琪一区二区三区| 日韩一级免费一区| 美女视频网站久久| 日韩欧美中文字幕制服| 久久精品久久精品| 久久人人97超碰com| 国产乱色国产精品免费视频| 亚洲精品一区二区三区蜜桃下载 | 粉嫩13p一区二区三区| 久久久久久久久久久久久久久99 |