Пример #1
0
 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;
 }
Пример #2
0
  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);
  }