private WKBAttributeIO getWKBReader(GeometryFactory factory) { WKBAttributeIO reader = wkbReader.get(); if (reader == null) { reader = new WKBAttributeIO(factory); wkbReader.set(reader); } else { reader.setGeometryFactory(factory); } return reader; }
public Geometry decodeGeometryValue( GeometryDescriptor descriptor, ResultSet rs, int column, GeometryFactory factory, Connection cx) throws IOException, SQLException { WKBAttributeIO reader = getWKBReader(factory); return (Geometry) reader.read(rs, column); }