Examples of JGeometry


Examples of oracle.spatial.geometry.JGeometry

    @Nullable
    public Geometry getValue(ResultSet rs, int startIndex) throws SQLException {
        byte[] bytes = rs.getBytes(startIndex);
        if (bytes != null) {
            try {
                JGeometry geometry = JGeometry.load(bytes);
                return JGeometryConverter.convert(geometry);
            } catch (Exception e) {
                throw new SQLException(e);
            }
        } else {
View Full Code Here

Examples of oracle.spatial.geometry.JGeometry

    }

    @Override
    public void setValue(PreparedStatement st, int startIndex, Geometry value) throws SQLException {
        try {
            JGeometry geo = JGeometryConverter.convert(value);
            STRUCT struct = JGeometry.store(st.getConnection(), geo);
            st.setObject(startIndex, struct);
        } catch (Exception e) {
            throw new SQLException(e);
        }
View Full Code Here

Examples of oracle.spatial.geometry.JGeometry

            elemInfo[offset++] = 2003;
            elemInfo[offset++] = 1;
            pointOffset += geometry.getInteriorRingN(i).getNumPoints() * dim;
        }
        int gtype = dim * 1000 + (geometry.isMeasured() ? dim : 0) * 100 + GTYPE_POLYGON;
        return new JGeometry(gtype, srid, elemInfo, points);
    }
View Full Code Here

Examples of oracle.spatial.geometry.JGeometry

        int srid = geometry.getSRID();
        int dim = geometry.getCoordinateDimension();
        double[] points = getPoints(geometry.getPoints());
        int[] elemInfo = new int[]{1, 2, 1};
        int gtype = dim * 1000 + (geometry.isMeasured() ? dim : 0) * 100 + GTYPE_CURVE;
        return new JGeometry(gtype, srid, elemInfo, points);
    }
View Full Code Here

Examples of oracle.spatial.geometry.JGeometry

        int srid = geometry.getSRID();
        int dim = geometry.getCoordinateDimension();
        double[] points = getPoints(geometry.getPoints());
        int[] elemInfo = new int[]{1, 1, geometry.getNumPoints()};
        int gtype = dim * 1000 + (geometry.isMeasured() ? dim : 0) * 100 + GTYPE_MULTIPOINT;
        return new JGeometry(gtype, srid, elemInfo, points);
    }
View Full Code Here

Examples of oracle.spatial.geometry.JGeometry

            elemInfo[offset++] = 2;
            elemInfo[offset++] = 1;
            pointOffset += geometry.getGeometryN(i).getNumPoints() * dim;
        }
        int gtype = dim * 1000 + (geometry.isMeasured() ? dim : 0) * 100 + GTYPE_MULTICURVE;
        return new JGeometry(gtype, srid, elemInfo, points);
    }
View Full Code Here

Examples of oracle.spatial.geometry.JGeometry

            elemInfo[offset++] = 2003;
            elemInfo[offset++] = 1;
            pointOffset += geometry.getInteriorRingN(i).getNumPoints() * dim;
        }
        int gtype = dim * 1000 + (geometry.isMeasured() ? dim : 0) * 100 + GTYPE_POLYGON;
        return new JGeometry(gtype, srid, elemInfo, points);
    }
View Full Code Here

Examples of oracle.spatial.geometry.JGeometry

        int srid = geometry.getSRID();
        int dim = geometry.getCoordinateDimension();
        double[] points = getPoints(geometry.getPoints());
        int[] elemInfo = new int[]{1, 2, 1};
        int gtype = dim * 1000 + (geometry.isMeasured() ? dim : 0) * 100 + GTYPE_CURVE;
        return new JGeometry(gtype, srid, elemInfo, points);
    }
View Full Code Here

Examples of oracle.spatial.geometry.JGeometry

        int srid = geometry.getSRID();
        int dim = geometry.getCoordinateDimension();
        double[] points = getPoints(geometry.getPoints());
        int[] elemInfo = new int[]{1, 1, geometry.getNumPoints()};
        int gtype = dim * 1000 + (geometry.isMeasured() ? dim : 0) * 100 + GTYPE_MULTIPOINT;
        return new JGeometry(gtype, srid, elemInfo, points);
    }
View Full Code Here

Examples of oracle.spatial.geometry.JGeometry

            elemInfo[offset++] = 2;
            elemInfo[offset++] = 1;
            pointOffset += geometry.getGeometryN(i).getNumPoints() * dim;
        }
        int gtype = dim * 1000 + (geometry.isMeasured() ? dim : 0) * 100 + GTYPE_MULTICURVE;
        return new JGeometry(gtype, srid, elemInfo, points);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.