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

Restore return type of ValueGeometry.getGeometry()

上级 bfeedc4b
...@@ -167,7 +167,7 @@ public class ValueGeometry extends Value { ...@@ -167,7 +167,7 @@ public class ValueGeometry extends Value {
* *
* @return a copy of the geometry object * @return a copy of the geometry object
*/ */
public Object getGeometry() { public Geometry getGeometry() {
if (geometry == null) { if (geometry == null) {
try { try {
geometry = JTSUtils.ewkb2geometry(bytes, getDimensionSystem()); geometry = JTSUtils.ewkb2geometry(bytes, getDimensionSystem());
......
...@@ -612,7 +612,7 @@ public class TestSpatial extends TestDb { ...@@ -612,7 +612,7 @@ public class TestSpatial extends TestDb {
ValueGeometry geom3d = ValueGeometry.get(ewkt); ValueGeometry geom3d = ValueGeometry.get(ewkt);
assertEquals(ewkt, geom3d.getString()); assertEquals(ewkt, geom3d.getString());
ValueGeometry copy = ValueGeometry.get(geom3d.getBytes()); ValueGeometry copy = ValueGeometry.get(geom3d.getBytes());
Geometry g = (Geometry) copy.getGeometry(); Geometry g = copy.getGeometry();
assertEquals(6, g.getCoordinates()[0].z); assertEquals(6, g.getCoordinates()[0].z);
assertEquals(5, g.getCoordinates()[1].z); assertEquals(5, g.getCoordinates()[1].z);
assertEquals(4, g.getCoordinates()[2].z); assertEquals(4, g.getCoordinates()[2].z);
...@@ -697,7 +697,7 @@ public class TestSpatial extends TestDb { ...@@ -697,7 +697,7 @@ public class TestSpatial extends TestDb {
assertFalse(valueGeometry.equals(valueGeometry2)); assertFalse(valueGeometry.equals(valueGeometry2));
ValueGeometry valueGeometry3 = ValueGeometry.getFromGeometry(geometry); ValueGeometry valueGeometry3 = ValueGeometry.getFromGeometry(geometry);
assertEquals(valueGeometry, valueGeometry3); assertEquals(valueGeometry, valueGeometry3);
assertEquals(geometry.getSRID(), ((Geometry) valueGeometry3.getGeometry()).getSRID()); assertEquals(geometry.getSRID(), valueGeometry3.getGeometry().getSRID());
} }
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论