/* * (non-Javadoc) * * @see org.geotools.gce.imagemosaic.jdbc.JDBCAccessBase#setGridSelectParams(java.sql.PreparedStatement, * org.geotools.geometry.GeneralEnvelope, org.geotools.gce.imagemosaic.jdbc.ImageLevelInfo) */ @Override protected void setGridSelectParams( PreparedStatement s, GeneralEnvelope envelope, ImageLevelInfo li) throws SQLException { WKBWriter w = new WKBWriter(); byte[] bytes = w.write(polyFromEnvelope(envelope)); s.setBytes(1, bytes); s.setInt(2, li.getSrsId()); }
private String convertToWKB(Geometry g) { if (g == null) return ""; return WKBWriter.toHex((new WKBWriter().write(g))); }
public static String writeWKB(Geometry g) { if (g == null) return ""; return WKBWriter.toHex((new WKBWriter().write(g))); }