Geometry readGeometry(ResultSet rs, int column, GeometryFactory factory, Connection cx) throws IOException, SQLException { return readGeometry(rs.getObject(column), factory, cx); }
Geometry readGeometry(ResultSet rs, String column, GeometryFactory factory, Connection cx) throws IOException, SQLException { return readGeometry(rs.getObject(column), factory, cx); }
public Geometry decodeGeometryValue( GeometryDescriptor descriptor, ResultSet rs, int column, GeometryFactory factory, Connection cx, Hints hints) throws IOException, SQLException { // read the geometry Geometry geom = readGeometry(rs, column, factory, cx); return convertGeometry(geom, descriptor, factory); };
@Override public Envelope decodeGeometryEnvelope(ResultSet rs, int column, Connection cx) throws SQLException, IOException { Geometry geom = readGeometry(rs, column, new GeometryFactory(), cx); return geom != null ? geom.getEnvelopeInternal() : null; }
Geometry geometry = readGeometry(rs, 1, new GeometryFactory(), cx);
static final class GeomClasses extends HashMap<Class, String> { private static final long serialVersionUID = -3359664692996608331L; public GeomClasses() { super(); put(Point.class, "POINT"); put(LineString.class, "LINE"); put(LinearRing.class, "LINE"); put(Polygon.class, "POLYGON"); put(GeometryCollection.class, "COLLECTION"); put(MultiPoint.class, "MULTIPOINT"); put(MultiLineString.class, "MULTILINE"); put(MultiPolygon.class, "MULTIPOLYGON"); } }