提交 dfc38f4b authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Restore ValueGeometry.get(String, int) for H2GIS

上级 03f79615
......@@ -123,6 +123,22 @@ public class ValueGeometry extends Value {
}
}
/**
* Get or create a geometry value for the given geometry.
*
* @param s the WKT representation of the geometry
* @param srid the srid of the object
* @return the value
*/
public static ValueGeometry get(String s, int srid) {
// This method is not used in H2, but preserved for H2GIS
try {
return get(new WKTReader(new GeometryFactory(new PrecisionModel(), srid)).read(s));
} catch (ParseException ex) {
throw DbException.convert(ex);
}
}
/**
* Get or create a geometry value for the given geometry.
*
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论