提交 93d7776e 编写于 作者: S ShadelessFox

#11116 Fix truncated geometry write


Former-commit-id: 37984ede
上级 78175611
......@@ -37,6 +37,7 @@ import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.io.ParseException;
import org.locationtech.jts.io.WKBReader;
import org.locationtech.jts.io.WKTReader;
import org.locationtech.jts.io.WKTWriter;
import java.lang.reflect.Method;
import java.sql.SQLException;
......@@ -226,7 +227,8 @@ public class PostgreGeometryValueHandler extends JDBCAbstractValueHandler {
}
private String getStringFromGeometry(JDBCSession session, Geometry geometry) throws DBCException {
String strGeom = geometry.toString();
// Use all possible dimensions (4 stands for XYZM) for the most verbose output (see DBGeometry#getString)
final String strGeom = new WKTWriter(4).write(geometry);
if (geometry.getSRID() > 0) {
return "SRID=" + geometry.getSRID() + ";" + strGeom;
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册