h2/src/test/org/h2/test/db/TestSpatial.java
/**
     * Test serialization of Z and SRID values.
     */
Test serialization of Z and SRID values.
Test serialization of Z and SRID values .
private void testWKB() {
        ValueGeometry geom3d = ValueGeometry.get("POLYGON ((67 13 6, 67 18 5, 59 18 4, 59 13 6,  67 13 6))");
        ValueGeometry copy = ValueGeometry.get(geom3d.getBytes());
        assertEquals(6, copy.getGeometry().getCoordinates()[0].z);
        assertEquals(5, copy.getGeometry().getCoordinates()[1].z);
        assertEquals(4, copy.getGeometry().getCoordinates()[2].z);
        geom3d.getGeometry().setSRID(27572);
        copy = ValueGeometry.get(geom3d.getBytes());
        assertEquals(27572, copy.getGeometry().getSRID());
    }
private void testWKB ( ) { ValueGeometry geom3d = ValueGeometry . get ( "POLYGON ((67 13 6, 67 18 5, 59 18 4, 59 13 6,  67 13 6))" ) ; ValueGeometry copy = ValueGeometry . get ( geom3d . getBytes ( ) ) ; assertEquals ( 6 , copy . getGeometry ( ) . getCoordinates ( ) [ 0 ] . z ) ; assertEquals ( 5 , copy . getGeometry ( ) . getCoordinates ( ) [ 1 ] . z ) ; assertEquals ( 4 , copy . getGeometry ( ) . getCoordinates ( ) [ 2 ] . z ) ; geom3d . getGeometry ( ) . setSRID ( 27572 ) ; copy = ValueGeometry . get ( geom3d . getBytes ( ) ) ; assertEquals ( 27572 , copy . getGeometry ( ) . getSRID ( ) ) ; }
Test serialization of Z and SRID values.
Test serialization of Z and SRID values .
// Test SRID