use of com.revolsys.geometry.wkb.WKBHexFileReader in project com.revolsys.open by revolsys.
the class IOUtil method readGeometriesFromWKBHexString.
public static Geometry readGeometriesFromWKBHexString(final String wkb, final GeometryFactory geomFact) throws ParseException, IOException {
final WKBReader reader = new WKBReader(geomFact);
final WKBHexFileReader fileReader = new WKBHexFileReader(new StringReader(wkb), reader);
final List geomList = fileReader.read();
if (geomList.size() == 1) {
return (Geometry) geomList.get(0);
}
return geomFact.geometryCollection(geomList);
}
Aggregations