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

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

?? jtstestparser.java

?? postGIS是一個能夠使用postSQL數據庫來管理GIS數據的小程序,充分發揮了該數據庫的空間管理功能,非常有用哦
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * JtsTestParser.java *  * PostGIS extension for PostgreSQL JDBC driver - example and test classes *  * (C) 2004 Paul Ramsey, pramsey@refractions.net *  * (C) 2005 Markus Schaber, markus.schaber@logix-tt.com *  * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License. *  * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. *  * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. *  * $Id: JtsTestParser.java 2557 2006-12-18 14:12:20Z mschaber $ */package examples;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.sql.Types;import org.postgis.binary.ValueSetter;import org.postgis.jts.JtsBinaryParser;import org.postgis.jts.JtsBinaryWriter;import org.postgis.jts.JtsGeometry;import org.postgresql.util.PGtokenizer;import com.vividsolutions.jts.geom.Geometry;import com.vividsolutions.jts.geom.GeometryCollection;import com.vividsolutions.jts.geom.LineString;import com.vividsolutions.jts.geom.LinearRing;import com.vividsolutions.jts.geom.MultiLineString;import com.vividsolutions.jts.geom.MultiPoint;import com.vividsolutions.jts.geom.MultiPolygon;import com.vividsolutions.jts.geom.Point;import com.vividsolutions.jts.geom.Polygon;public class JtsTestParser {    public static String ALL = "ALL", ONLY10 = "ONLY10", EQUAL10 = "EQUAL10";    /**     * Our set of geometries to test.     */    public static final String[][] testset = new String[][] {            { ALL, // 2D                    "POINT(10 10)" },            { ALL, // 3D with 3rd coordinate set to 0                    "POINT(10 10 0)" },            { ALL, // 3D                    "POINT(10 10 20)" },            { ALL, "MULTIPOINT(11 12, 20 20)" },            { ALL, "MULTIPOINT(11 12 13, 20 20 20)" },            { ALL, "LINESTRING(10 10,20 20,50 50,34 34)" },            { ALL, "LINESTRING(10 10 20,20 20 20,50 50 50,34 34 34)" },            { ALL, "POLYGON((10 10,20 10,20 20,20 10,10 10),(5 5,5 6,6 6,6 5,5 5))" },            { ALL, "POLYGON((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0))" },            {                    ALL,                    "MULTIPOLYGON(((10 10,20 10,20 20,20 10,10 10),(5 5,5 6,6 6,6 5,5 5)),((10 10,20 10,20 20,20 10,10 10),(5 5,5 6,6 6,6 5,5 5)))" },            {                    ALL,                    "MULTIPOLYGON(((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)),((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)))" },            { ALL, "MULTILINESTRING((10 10,20 10,20 20,20 10,10 10),(5 5,5 6,6 6,6 5,5 5))" },            { ALL, "MULTILINESTRING((10 10 5,20 10 5,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0))" },            { ALL, "GEOMETRYCOLLECTION(POINT(10 10),POINT(20 20))" },            { ALL, "GEOMETRYCOLLECTION(POINT(10 10 20),POINT(20 20 20))" },            {                    ALL,                    "GEOMETRYCOLLECTION(LINESTRING(10 10 20,20 20 20, 50 50 50, 34 34 34),LINESTRING(10 10 20,20 20 20, 50 50 50, 34 34 34))" },            {                    ALL,                    "GEOMETRYCOLLECTION(POLYGON((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)),POLYGON((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)))" },            { ONLY10, // Cannot be parsed by 0.X servers                    "GEOMETRYCOLLECTION(MULTIPOINT(10 10 10, 20 20 20),MULTIPOINT(10 10 10, 20 20 20))" },            { EQUAL10, // PostGIs 0.X "flattens" this geometry, so it is not                    // equal after reparsing.                    "GEOMETRYCOLLECTION(MULTILINESTRING((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)))" },            { EQUAL10,// PostGIs 0.X "flattens" this geometry, so it is not                        // equal                    // after reparsing.                    "GEOMETRYCOLLECTION(MULTIPOLYGON(((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)),((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0))),MULTIPOLYGON(((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)),((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0))))" },            {                    ALL,                    "GEOMETRYCOLLECTION(POINT(10 10 20),LINESTRING(10 10 20,20 20 20, 50 50 50, 34 34 34),POLYGON((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)))" },            { ONLY10, // Collections that contain both X and MultiX do not                        // work on                    // PostGIS 0.x                    "GEOMETRYCOLLECTION(POINT(10 10 20),MULTIPOINT(10 10 10, 20 20 20),LINESTRING(10 10 20,20 20 20, 50 50 50, 34 34 34),POLYGON((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)),MULTIPOLYGON(((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)),((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0))),MULTILINESTRING((10 10 0,20 10 0,20 20 0,20 10 0,10 10 0),(5 5 0,5 6 0,6 6 0,6 5 0,5 5 0)))" },            { ALL,// new (correct) representation                    "GEOMETRYCOLLECTION EMPTY" },    // end    };    /** The srid we use for the srid tests */    public static final int SRID = 4326;    /** The string prefix we get for the srid tests */    public static final String SRIDPREFIX = "SRID=" + SRID + ";";    /** How much tests did fail? */    public static int failcount = 0;    private static JtsBinaryParser bp = new JtsBinaryParser();    private static final JtsBinaryWriter bw = new JtsBinaryWriter();    /** The actual test method */    public static void test(String WKT, Connection[] conns, String flags) throws SQLException {        System.out.println("Original:  " + WKT);        Geometry geom = JtsGeometry.geomFromString(WKT);        String parsed = geom.toString();        if (WKT.startsWith("SRID=")) {            parsed = "SRID="+geom.getSRID()+";"+parsed;        }        System.out.println("Parsed:    " + parsed);        Geometry regeom = JtsGeometry.geomFromString(parsed);        String reparsed = regeom.toString();        if (WKT.startsWith("SRID=")) {            reparsed = "SRID="+geom.getSRID()+";"+reparsed;        }        System.out.println("Re-Parsed: " + reparsed);        if (!geom.equalsExact(regeom)) {            System.out.println("--- Geometries are not equal!");            failcount++;        } else if (geom.getSRID() != regeom.getSRID()) {            System.out.println("--- Geometriy SRIDs are not equal!");            failcount++;        } else if (!reparsed.equals(parsed)) {            System.out.println("--- Text Reps are not equal!");            failcount++;        } else {            System.out.println("Equals:    yes");        }        String hexNWKT = bw.writeHexed(geom, ValueSetter.NDR.NUMBER);        System.out.println("NDRHex:    " + hexNWKT);        regeom = JtsGeometry.geomFromString(hexNWKT);        System.out.println("ReNDRHex:  " + regeom.toString());        if (!geom.equalsExact(regeom)) {            System.out.println("--- Geometries are not equal!");            failcount++;        } else {            System.out.println("Equals:    yes");        }        String hexXWKT = bw.writeHexed(geom, ValueSetter.XDR.NUMBER);        System.out.println("XDRHex:    " + hexXWKT);        regeom = JtsGeometry.geomFromString(hexXWKT);        System.out.println("ReXDRHex:  " + regeom.toString());        if (!geom.equalsExact(regeom)) {            System.out.println("--- Geometries are not equal!");            failcount++;        } else {            System.out.println("Equals:    yes");        }        byte[] NWKT = bw.writeBinary(geom, ValueSetter.NDR.NUMBER);        regeom = bp.parse(NWKT);        System.out.println("NDR:       " + regeom.toString());        if (!geom.equalsExact(regeom)) {            System.out.println("--- Geometries are not equal!");            failcount++;        } else {            System.out.println("Equals:    yes");        }        byte[] XWKT = bw.writeBinary(geom, ValueSetter.XDR.NUMBER);        regeom = bp.parse(XWKT);        System.out.println("XDR:       " + regeom.toString());        if (!geom.equalsExact(regeom)) {            System.out.println("--- Geometries are not equal!");            failcount++;        } else {            System.out.println("Equals:    yes");        }        Geometry coordArrayGeom = rebuildCS(geom);        System.out.println("CoordArray:" + regeom.toString());        if (!geom.equalsExact(coordArrayGeom)) {            System.out.println("--- Geometries are not equal!");            failcount++;        } else {            System.out.println("Equals:    yes");        }        String coordArrayWKT = bw.writeHexed(coordArrayGeom, ValueSetter.NDR.NUMBER);        System.out.println("HexCArray: " + coordArrayWKT);        if (!coordArrayWKT.equals(hexNWKT)) {            System.out.println("--- CoordArray HexWKT is not equal: "+bp.parse(coordArrayWKT));            failcount++;        } else {            System.out.println("HexEquals: yes");        }        for (int i = 0; i < conns.length; i++) {            Connection connection = conns[i];            Statement statement = connection.createStatement();            int serverPostgisMajor = TestAutoregister.getPostgisMajor(statement);            if ((flags == ONLY10) && serverPostgisMajor < 1) {                System.out.println("PostGIS server too old, skipping test on connection " + i + ": "                        + connection.getCatalog());            } else {                System.out.println("Testing on connection " + i + ": " + connection.getCatalog());                try {                    Geometry sqlGeom = viaSQL(WKT, statement);                    System.out.println("SQLin    : " + sqlGeom.toString());                    if (!geom.equalsExact(sqlGeom)) {                        System.out.println("--- Geometries after SQL are not equal!");                        if (flags == EQUAL10 && serverPostgisMajor < 1) {                            System.out.println("--- This is expected with PostGIS " + serverPostgisMajor + ".X");                        } else {                            failcount++;                        }                    } else {                        System.out.println("Eq SQL in: yes");                    }                } catch (SQLException e) {                    System.out.println("--- Server side error: " + e.toString());                    failcount++;                }                try {                    Geometry sqlreGeom = viaSQL(parsed, statement);                    System.out.println("SQLout  :  " + sqlreGeom.toString());                    if (!geom.equalsExact(sqlreGeom)) {                        System.out.println("--- reparsed Geometries after SQL are not equal!");                        if (flags == EQUAL10 && serverPostgisMajor < 1) {                            System.out.println("--- This is expected with PostGIS " + serverPostgisMajor + ".X");                        } else {                            failcount++;                        }                    } else {                        System.out.println("Eq SQLout: yes");                    }                } catch (SQLException e) {                    System.out.println("--- Server side error: " + e.toString());                    failcount++;                }                try {                    Geometry sqlreGeom = viaPrepSQL(geom, connection);                    System.out.println("Prepared:  " + sqlreGeom.toString());                    if (!geom.equalsExact(sqlreGeom)) {                        System.out.println("--- reparsed Geometries after prepared StatementSQL are not equal!");                        if (flags == EQUAL10 && serverPostgisMajor < 1) {                            System.out.println("--- This is expected with PostGIS " + serverPostgisMajor + ".X");                        } else {                            failcount++;                        }                    } else {                        System.out.println("Eq Prep: yes");                    }                } catch (SQLException e) {                    System.out.println("--- Server side error: " + e.toString());                    failcount++;                }                // asEWKT() function is not present on PostGIS 0.X, and the test                // is pointless as 0.X uses EWKT as canonical rep so the same                // functionality was already tested above.                try {                    if (serverPostgisMajor >= 1) {                        Geometry sqlGeom = ewktViaSQL(WKT, statement);                        System.out.println("asEWKT   : " + sqlGeom.toString());                        if (!geom.equalsExact(sqlGeom)) {                            System.out.println("--- Geometries after EWKT SQL are not equal!");                            failcount++;                        } else {                            System.out.println("equal   : yes");                        }                    }                } catch (SQLException e) {                    System.out.println("--- Server side error: " + e.toString());                    failcount++;                }                // asEWKB() function is not present on PostGIS 0.X.                try {                    if (serverPostgisMajor >= 1) {                        Geometry sqlGeom = ewkbViaSQL(WKT, statement);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品成人一区二区艾草| 日韩高清在线电影| 日韩三级电影网址| 99re热这里只有精品视频| 日本aⅴ免费视频一区二区三区| 国产日韩欧美一区二区三区乱码 | 国产亚洲欧美日韩日本| 欧美性色黄大片| 丰满岳乱妇一区二区三区| 日精品一区二区三区| 1000精品久久久久久久久| 欧美精品一区二区久久久| 欧美视频一区二区在线观看| 99精品欧美一区二区三区综合在线| 久久99国产精品尤物| 亚洲国产一区二区视频| 中文字幕av一区二区三区| 精品对白一区国产伦| 欧美卡1卡2卡| 色999日韩国产欧美一区二区| 国产伦精品一区二区三区免费 | 久久99九九99精品| 天堂影院一区二区| 亚洲欧美韩国综合色| 国产精品麻豆久久久| 久久天天做天天爱综合色| 日韩欧美国产综合一区| 7799精品视频| 欧美日韩久久久久久| 欧美三级一区二区| 在线免费精品视频| 91麻豆免费观看| 99在线视频精品| 成人高清视频在线观看| 国内精品写真在线观看| 麻豆国产精品一区二区三区| 五月激情综合网| 亚洲va韩国va欧美va精品| 亚洲色图第一区| 亚洲图片激情小说| 亚洲精选免费视频| 亚洲午夜久久久久中文字幕久| 亚洲中国最大av网站| 亚洲成人动漫一区| 日韩高清国产一区在线| 免播放器亚洲一区| 九九精品视频在线看| 国产在线不卡一区| 国产精品一区二区你懂的| 国产精品99久久久久久似苏梦涵| 国产成人在线网站| 99在线精品观看| 日本韩国一区二区三区| 欧美色男人天堂| 91精品国产综合久久精品app| 欧美一区中文字幕| 精品成人一区二区三区| 精品国产一区久久| 久久久夜色精品亚洲| 欧美极品aⅴ影院| 亚洲精品视频在线| 免费看日韩a级影片| 国产一区二区影院| 国产成人综合在线| 在线免费精品视频| 欧美不卡在线视频| 国产精品另类一区| 亚洲自拍偷拍图区| 免费高清在线视频一区·| 国产精品自拍av| 日本高清不卡视频| 91精品国产色综合久久不卡蜜臀| 日韩免费一区二区| 国产三级久久久| 依依成人精品视频| 久久精品久久综合| 97精品久久久久中文字幕| 538prom精品视频线放| 久久免费视频色| 樱桃视频在线观看一区| 精品影院一区二区久久久| 99热这里都是精品| 777色狠狠一区二区三区| 欧美激情中文字幕一区二区| 一区二区在线看| 国内精品嫩模私拍在线| 在线观看免费亚洲| 欧美国产激情二区三区 | 日韩av在线播放中文字幕| 国产精品一区二区在线观看不卡 | 91精品国产综合久久久久久久久久| 日韩精品一区二区三区视频播放| 中文字幕在线免费不卡| 老司机免费视频一区二区 | 91影院在线观看| 日韩欧美精品三级| 亚洲精品亚洲人成人网| 紧缚奴在线一区二区三区| 91同城在线观看| 2019国产精品| 日本三级亚洲精品| 色综合久久久久久久| 久久久久国产免费免费| 日韩中文欧美在线| 成人av资源下载| 日韩一卡二卡三卡| 亚洲福利视频一区| 99久久精品国产一区二区三区| 欧美成人乱码一区二区三区| 亚洲成人精品影院| 日本二三区不卡| 国产精品美女一区二区在线观看| 久久精品久久精品| 7777精品伊人久久久大香线蕉的 | 久久久欧美精品sm网站| 亚洲成a人v欧美综合天堂| 成人免费的视频| 久久综合九色综合97婷婷 | 97se狠狠狠综合亚洲狠狠| 精品国产a毛片| 久久精品999| 91精品欧美福利在线观看| 一区二区三区蜜桃| 色婷婷亚洲一区二区三区| 欧美激情一区在线观看| 国产精品小仙女| 精品国产不卡一区二区三区| 久久精品国产亚洲一区二区三区| 欧美日韩精品欧美日韩精品一 | 天天影视网天天综合色在线播放| 色偷偷久久人人79超碰人人澡| 17c精品麻豆一区二区免费| 成人的网站免费观看| 国产精品污网站| jizzjizzjizz欧美| 亚洲婷婷综合久久一本伊一区| 成人高清在线视频| 中文字幕在线不卡视频| 91免费国产视频网站| 一区二区三区精密机械公司| 在线日韩国产精品| 午夜精品久久久久久久99樱桃| 欧美日韩高清不卡| 日本午夜精品一区二区三区电影| 欧美高清hd18日本| 麻豆国产一区二区| 久久影院视频免费| 国产999精品久久| 中文字幕制服丝袜一区二区三区 | 久久97超碰色| 久久色在线观看| 国产v综合v亚洲欧| 国产精品国产三级国产普通话99| 91在线视频观看| 亚洲在线视频网站| 欧美一级高清片在线观看| 国内久久精品视频| 国产精品电影一区二区| 欧美专区在线观看一区| 亚州成人在线电影| 日韩你懂的在线观看| 国产成人精品在线看| 亚洲精品视频免费观看| 91麻豆精品91久久久久久清纯| 久久se这里有精品| 欧美韩日一区二区三区| 91在线porny国产在线看| 五月婷婷综合网| 久久亚洲精精品中文字幕早川悠里| 国产91在线观看丝袜| 亚洲一区二区在线视频| 日韩一级完整毛片| 国产91丝袜在线播放| 亚洲福利一二三区| 久久免费看少妇高潮| 在线亚洲一区观看| 狠狠久久亚洲欧美| 亚洲图片另类小说| 精品欧美一区二区在线观看| 99久久久精品| 免播放器亚洲一区| 亚洲欧美乱综合| 精品国产伦一区二区三区观看体验| 成人毛片老司机大片| 亚洲va中文字幕| 亚洲国产精品ⅴa在线观看| 欧美性xxxxxxxx| 国产精品一区二区你懂的| 一区二区成人在线| 久久亚洲一区二区三区四区| 91久久精品一区二区| 国内精品久久久久影院色 | 一区二区日韩av| 久久婷婷成人综合色| 欧美群妇大交群中文字幕| 成人av网址在线| 蜜乳av一区二区三区| 亚洲一区精品在线| 国产精品沙发午睡系列990531| 91精品国产入口|