Package oracle.sql

Examples of oracle.sql.STRUCT


    }

    final public void testDecodePolygon() throws SQLException {
        if (this.connection == null)
            return;
        STRUCT datum = converter.toSDO(fixture.polygon);
        Geometry geom = (Geometry) converter.asGeometry(datum);

        assertEquals(fixture.polygon, geom);
    }
View Full Code Here


    final public void testPolygonEncoding() throws SQLException {
        if (this.connection == null)
            return;

        Geometry g = fixture.polygonWithHole;
        STRUCT datum = converter.toSDO(g);

        assertEquals(2003, SDO.gType(g));
        assertEquals(-1, SDO.SRID(g));
        assertNull(SDO.point(g));
View Full Code Here

    final public void testDecodePolygonWithHole() throws SQLException {
        if (this.connection == null)
            return;

        STRUCT datum = converter.toSDO(fixture.polygonWithHole);
        Geometry geom = (Geometry) converter.asGeometry(datum);

        assertEquals(fixture.polygonWithHole, geom);
    }
View Full Code Here

    final public void testDecodeMultiPoint() throws SQLException {
        if (this.connection == null)
            return;

        STRUCT datum = converter.toSDO(fixture.multiPoint);
        Geometry geom = (Geometry) converter.asGeometry(datum);

        assertEquals(fixture.multiPoint, geom);
    }
View Full Code Here

    final public void testDecodeMultiLine() throws SQLException {
        if (this.connection == null)
            return;

        STRUCT datum = converter.toSDO(fixture.multiLineString);
        Geometry geom = (Geometry) converter.asGeometry(datum);

        assertNotNull(geom);
        assertEquals(fixture.multiLineString, geom);
    }
View Full Code Here

    final public void testDecodeMultiPolygon() throws SQLException {
        if (this.connection == null)
            return;

        STRUCT datum = converter.toSDO(fixture.multiPolygon);

        // System.out.println(fixture.multiPolygon);
        // System.out.println( Data.toString( datum ) );

        Geometry geom = (Geometry) converter.asGeometry(datum);
View Full Code Here

    final public void testDecodeMultiPolygonWithHole() throws SQLException {
        if (this.connection == null)
            return;

        STRUCT datum = converter.toSDO(fixture.multiPolygonWithHole);

        Geometry geom = (Geometry) converter.asGeometry(datum);

        assertNotNull(geom);
        assertTrue(geom.isValid());
View Full Code Here

    final public void testGeometryCollection() throws SQLException {
        if (this.connection == null)
            return;

        STRUCT datum = converter.toSDO(fixture.geometryCollection);

        Geometry geom = (Geometry) converter.asGeometry(datum);

        assertNotNull(geom);
        assertTrue(fixture.geometryCollection.isValid());
View Full Code Here

                + "679577.8433 5151918.0814, 679567.425 5151917.796), "
                + "LINESTRING (679569.221815255 5151900.91179101, 679611.846517919 5151904.66336728), "
                + "POINT (679611.982873552 5151904.66229049))";
        Geometry original = new WKTReader().read(wkt);
        original.setSRID(25832);
        STRUCT datum = converter.toSDO(original);
        Geometry geom = (Geometry) converter.asGeometry(datum);
        assertEquals(25832, geom.getSRID());
        assertEquals(original, geom);
    }
View Full Code Here

            return;
       
        String wkt = "GEOMETRYCOLLECTION (POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0)), POINT (5 5))";
        Geometry original = new WKTReader().read(wkt);
        original.setSRID(4326);
        STRUCT datum = converter.toSDO(original);
        Geometry geom = (Geometry) converter.asGeometry(datum);
        assertEquals(4326, geom.getSRID());
        assertEquals(original, geom);
    }
View Full Code Here

TOP

Related Classes of oracle.sql.STRUCT

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.