This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new 38bec33499 feat(Geometry): implement getTopologicDimension and test
cases
38bec33499 is described below
commit 38bec334997157a1b8fdeee57d08cd72f0328b06
Author: jsorel <[email protected]>
AuthorDate: Tue Oct 13 11:01:55 2026 +0200
feat(Geometry): implement getTopologicDimension and test cases
---
.../main/org/apache/sis/geometries/BBox.java | 9 ++++
.../main/org/apache/sis/geometries/Geometry.java | 6 +--
.../main/org/apache/sis/geometries/HyperPlane.java | 5 +++
.../main/org/apache/sis/geometries/OBBox.java | 6 ++-
.../main/org/apache/sis/geometries/Plane.java | 5 +++
.../main/org/apache/sis/geometries/Prism.java | 10 +++++
.../main/org/apache/sis/geometries/Ray.java | 5 +++
.../geometries/csg/ConstructiveSolidGeometry.java | 8 ++--
.../org/apache/sis/geometries/solid/Frustrum.java | 5 +++
.../org/apache/sis/geometries/surface/Capsule.java | 9 ++++
.../apache/sis/geometries/surface/Cylinder.java | 9 ++++
.../test/org/apache/sis/geometries/BBoxTest.java | 48 ++++++++++++++++++++++
.../sis/geometries/GeometryCollectionTest.java | 8 +++-
.../test/org/apache/sis/geometries/PrismTest.java | 13 +++++-
.../sis/geometries/curve/ArcByBulgeTest.java | 11 ++++-
.../sis/geometries/curve/ArcByCenterPointTest.java | 8 +++-
.../sis/geometries/curve/BSplineCurveTest.java | 8 +++-
.../sis/geometries/curve/CircularStringTest.java | 7 +++-
.../sis/geometries/curve/CompoundCurveTest.java | 8 +++-
.../org/apache/sis/geometries/curve/ConicTest.java | 8 +++-
.../apache/sis/geometries/curve/GeodesicTest.java | 7 +++-
.../sis/geometries/curve/LineStringTest.java | 2 +-
.../sis/geometries/curve/OffsetCurveTest.java | 10 ++++-
.../sis/geometries/curve/PolynomialSplineTest.java | 8 +++-
.../sis/geometries/curve/ProductCurveTest.java | 13 +++++-
.../org/apache/sis/geometries/curve/RhumbTest.java | 7 +++-
.../apache/sis/geometries/curve/SpiralTest.java | 17 +++++++-
.../internal/shared/DefaultReversedCurveTest.java | 13 +++++-
.../shared/DefaultReversedSurfaceTest.java | 15 ++++++-
.../sis/geometries/solid/BSplineSolidTest.java | 7 +++-
.../sis/geometries/solid/PolyhedronTest.java | 13 +++++-
.../sis/geometries/surface/CurvePolygonTest.java | 9 +++-
.../surface/ParametricCurveSurfaceTest.java | 4 +-
.../apache/sis/geometries/surface/PolygonTest.java | 2 +-
.../geometries/surface/PolyhedralSurfaceTest.java | 10 ++++-
35 files changed, 299 insertions(+), 34 deletions(-)
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/BBox.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/BBox.java
index 69f47b06e2..d914577fec 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/BBox.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/BBox.java
@@ -92,6 +92,15 @@ public final class BBox extends GeneralEnvelope implements
Geometry {
return GeometryType.BBOX;
}
+ /**
+ * Returns the topological dimension of this box: the number of axes of
its coordinate
+ * reference system, or −1 if the box is empty.
+ */
+ @Override
+ public int getTopologicDimension() {
+ return isEmpty() ? -1 : getDimension();
+ }
+
public void add(Vector<?> position) throws MismatchedDimensionException {
add(Vectors.asDirectPostion(position));
}
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Geometry.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Geometry.java
index d7c43cb4e8..eb3ea6a22d 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Geometry.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Geometry.java
@@ -261,11 +261,7 @@ public sealed interface Geometry
* @see ISO 19107:2019 - 6.4.4.22
*/
@UML(identifier="topologicalDimension", specification=ISO_19107)
- default int getTopologicDimension() {
- //TODO remove this method default when all classes implement it.
- //Empty, Point, Curve, Surface, Solid and GeometryCollection already
do.
- throw new UnsupportedOperationException();
- }
+ int getTopologicDimension();
/**
* Rule used to compute the {@linkplain #getBoundary() boundary} of this
geometry
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/HyperPlane.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/HyperPlane.java
index c1959bd062..c8799ab869 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/HyperPlane.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/HyperPlane.java
@@ -77,6 +77,11 @@ public final class HyperPlane extends AbstractGeometry{
return GeometryType.HYPERPLANE;
}
+ @Override
+ public int getTopologicDimension() {
+ return getDimension();
+ }
+
public DataPoints getDataPoints() {
return points;
}
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/OBBox.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/OBBox.java
index 405b1a8581..477849b9a4 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/OBBox.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/OBBox.java
@@ -18,7 +18,6 @@ package org.apache.sis.geometries;
import org.opengis.geometry.Envelope;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.apache.sis.geometries.DataPoints;
import org.apache.sis.geometries.internal.shared.AbstractGeometry;
import org.apache.sis.geometries.internal.shared.SinglePositionDataPoints;
import org.apache.sis.maths.Vectors;
@@ -63,6 +62,11 @@ public final class OBBox extends AbstractGeometry {
return GeometryType.BBOX;
}
+ @Override
+ public int getTopologicDimension() {
+ return isEmpty() ? -1 : getDimension();
+ }
+
@Override
public boolean isEmpty() {
return false;
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Plane.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Plane.java
index 2a5d0d97f5..3bf350b7fa 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Plane.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Plane.java
@@ -89,6 +89,11 @@ public final class Plane extends AbstractGeometry{
return GeometryType.PLANE;
}
+ @Override
+ public int getTopologicDimension() {
+ return getDimension();
+ }
+
public DataPoints getDataPoints() {
return points;
}
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Prism.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Prism.java
index af1c3a47d5..b4d1b38a0c 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Prism.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Prism.java
@@ -42,6 +42,16 @@ public sealed interface Prism extends Geometry
return getBase().getDataPointsType();
}
+ /**
+ * Returns the topological dimension of this prism, which is one more than
the dimension of
+ * the base shape it extrudes: extruding a point gives a curve, extruding
a curve gives a
+ * surface, and extruding a surface gives a solid.
+ */
+ @Override
+ default int getTopologicDimension() {
+ return getBase().getTopologicDimension() + 1;
+ }
+
/**
* Returns the positions of the geometry this prism is the extrusion of.
The positions the
* extrusion adds are not materialized, so they are not part of the
returned sequence.
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Ray.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Ray.java
index 10defe5822..897b484728 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Ray.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/Ray.java
@@ -74,6 +74,11 @@ public final class Ray extends AbstractGeometry{
return GeometryType.RAY;
}
+ @Override
+ public int getTopologicDimension() {
+ return 1;
+ }
+
public DataPoints getDataPoints() {
return points;
}
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/csg/ConstructiveSolidGeometry.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/csg/ConstructiveSolidGeometry.java
index cb8069d9d5..4863aea5de 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/csg/ConstructiveSolidGeometry.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/csg/ConstructiveSolidGeometry.java
@@ -70,12 +70,14 @@ public final class ConstructiveSolidGeometry extends
AbstractGeometry {
throw new UnsupportedOperationException("Not supported yet.");
}
- /**
- * Returns an empty sequence: this geometry is a placeholder and holds no
position yet.
- */
@Override
public DataPoints getDataPoints() {
return new EmptyDataPoints(getCoordinateReferenceSystem());
}
+ @Override
+ public int getTopologicDimension() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
}
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/Frustrum.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/Frustrum.java
index 5bf00ad076..3e3c59861b 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/Frustrum.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/solid/Frustrum.java
@@ -89,4 +89,9 @@ public final class Frustrum extends AbstractGeometry {
return ConcatenatedDataPoints.of(planes);
}
+ @Override
+ public int getTopologicDimension() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
}
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Capsule.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Capsule.java
index 2eff91b59d..766eea1e45 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Capsule.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Capsule.java
@@ -90,6 +90,15 @@ public final class Capsule extends AbstractGeometry{
return points;
}
+ /**
+ * A capsule is a surface.
+ * @return 2
+ */
+ @Override
+ public int getTopologicDimension() {
+ return 2;
+ }
+
/**
* @return the center of the bottom sphere
*/
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Cylinder.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Cylinder.java
index 3651df2c36..fbd53f28c8 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Cylinder.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/surface/Cylinder.java
@@ -92,6 +92,15 @@ public final class Cylinder extends AbstractGeometry{
return GeometryType.CYLINDER;
}
+ /**
+ * A cylinder is a surface.
+ * @return 2
+ */
+ @Override
+ public int getTopologicDimension() {
+ return 2;
+ }
+
public DataPoints getDataPoints() {
return points;
}
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/BBoxTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/BBoxTest.java
new file mode 100644
index 0000000000..556b32a158
--- /dev/null
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/BBoxTest.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.geometries;
+
+// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import org.junit.jupiter.api.Test;
+
+
+/**
+ * Tests {@link BBox}.
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public class BBoxTest extends GeometryTest {
+ /**
+ * The topological dimension of a box is the number of axes of its
coordinate reference
+ * system, since a non-empty box occupies the whole of that space locally.
+ */
+ @Test
+ public void testGetTopologicDimension() {
+ assertEquals(2, new BBox(CRS_2D, 0,0, 10,10).getTopologicDimension());
+ assertEquals(3, new BBox(CRS_3D, 0,0,0,
10,10,10).getTopologicDimension());
+ }
+
+ /**
+ * The topological dimension of an empty box is −1, consistently with
{@link Empty}.
+ */
+ @Test
+ public void testGetTopologicDimensionOfEmptyBox() {
+ final BBox bbox = new BBox(CRS_2D);
+ assertEquals(-1, bbox.getTopologicDimension());
+ }
+}
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryCollectionTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryCollectionTest.java
index a44d7a0712..6f2f2c2fe6 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryCollectionTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/GeometryCollectionTest.java
@@ -17,6 +17,7 @@
package org.apache.sis.geometries;
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -43,8 +44,13 @@ public class GeometryCollectionTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final Geometry point = GeometryFactory.DEFAULT.createPoint(CRS_2D, 1,
2);
+ final Geometry line = GeometryFactory.DEFAULT.createLineString(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0));
+ final GeometryCollection<Geometry> collection =
GeometryFactory.DEFAULT.createGeometryCollection(CRS_2D, point, line);
+ assertEquals(1, collection.getTopologicDimension(),
+ "The topological dimension of a collection is the maximum
of the dimensions of its elements.");
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PrismTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PrismTest.java
index 6d0a0705ec..14fffc6f7d 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PrismTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/PrismTest.java
@@ -16,7 +16,11 @@
*/
package org.apache.sis.geometries;
+import org.apache.sis.geometries.curve.LineString;
+import org.apache.sis.measure.NumberRange;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -88,8 +92,15 @@ public class PrismTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final Point point = GeometryFactory.DEFAULT.createPoint(CRS_2D, 1, 2);
+ final Prism pointPrism = GeometryFactory.DEFAULT.createPrism(point,
NumberRange.create(0., true, 10., true), null);
+ assertEquals(1, pointPrism.getTopologicDimension(), "Extruding a point
gives a curve.");
+
+ final LineString segment = GeometryFactory.DEFAULT.createLineString(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0));
+ final Prism surfacePrism =
GeometryFactory.DEFAULT.createPrism(segment, NumberRange.create(0., true, 10.,
true), null);
+ assertEquals(2, surfacePrism.getTopologicDimension(), "Extruding a
curve gives a surface.");
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByBulgeTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByBulgeTest.java
index fd307aa43b..64e6b83bb7 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByBulgeTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByBulgeTest.java
@@ -16,7 +16,12 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+import org.apache.sis.maths.Vector;
+import org.apache.sis.maths.Vectors;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -84,8 +89,12 @@ public class ArcByBulgeTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final Vector<?> normal = Vectors.createDouble(2);
+ normal.set(new double[] {0, 1});
+ final ArcByBulge arc = GeometryFactory.DEFAULT.createArcByBulge(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0),
2.0, normal);
+ assertEquals(1, arc.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByCenterPointTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByCenterPointTest.java
index cd63c41206..732e9c6334 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByCenterPointTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ArcByCenterPointTest.java
@@ -16,7 +16,11 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+import org.apache.sis.geometries.Point;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -94,8 +98,10 @@ public class ArcByCenterPointTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final Point center = GeometryFactory.DEFAULT.createPoint(CRS_2D, 10,
20);
+ final ArcByCenterPoint arc =
GeometryFactory.DEFAULT.createArcByCenterPoint(center, 5.0, null, 0.0, 90.0);
+ assertEquals(1, arc.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BSplineCurveTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BSplineCurveTest.java
index 61593b9d9a..2c1c1a790d 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BSplineCurveTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/BSplineCurveTest.java
@@ -16,7 +16,10 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -69,8 +72,11 @@ public class BSplineCurveTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final BSplineCurve curve = GeometryFactory.DEFAULT.createBSplineCurve(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0),
null, null, 3,
+ null, null, false);
+ assertEquals(1, curve.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircularStringTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircularStringTest.java
index ea051eea77..70b5e97317 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircularStringTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CircularStringTest.java
@@ -16,7 +16,10 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -74,8 +77,10 @@ public class CircularStringTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final CircularString arc =
GeometryFactory.DEFAULT.createCircularString(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 5,5,
10,0, 5,-5, 0,0));
+ assertEquals(1, arc.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CompoundCurveTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CompoundCurveTest.java
index bfe3739f64..b3ee4f38bf 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CompoundCurveTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/CompoundCurveTest.java
@@ -16,7 +16,10 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -74,8 +77,11 @@ public class CompoundCurveTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final LineString segment = GeometryFactory.DEFAULT.createLineString(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0));
+ final CompoundCurve curve =
GeometryFactory.DEFAULT.createCompoundCurve(segment);
+ assertEquals(1, curve.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ConicTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ConicTest.java
index ebe05c53c7..451a2311a2 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ConicTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ConicTest.java
@@ -16,7 +16,10 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -49,8 +52,11 @@ public class ConicTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final Conic conic = GeometryFactory.DEFAULT.createConic(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0,
10,10, 0,10, 0,0),
+ null, true);
+ assertEquals(1, conic.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/GeodesicTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/GeodesicTest.java
index 7a0d6a1035..157c8ae6d4 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/GeodesicTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/GeodesicTest.java
@@ -16,7 +16,10 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -69,8 +72,10 @@ public class GeodesicTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final Geodesic geodesic = GeometryFactory.DEFAULT.createGeodesic(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,10));
+ assertEquals(1, geodesic.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LineStringTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LineStringTest.java
index 40ef017411..a5f127d55f 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LineStringTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/LineStringTest.java
@@ -119,8 +119,8 @@ public abstract class LineStringTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ assertEquals(1, createLineString(CRS_2D,
SEGMENT).getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/OffsetCurveTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/OffsetCurveTest.java
index 0d16f72118..688db0d8d0 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/OffsetCurveTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/OffsetCurveTest.java
@@ -16,7 +16,12 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+import org.apache.sis.measure.Quantities;
+import org.apache.sis.measure.Units;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -44,8 +49,11 @@ public class OffsetCurveTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final LineString base = GeometryFactory.DEFAULT.createLineString(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0));
+ final OffsetCurve curve =
GeometryFactory.DEFAULT.createOffsetCurve(base, Quantities.create(2,
Units.DEGREE), null);
+ assertEquals(1, curve.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialSplineTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialSplineTest.java
index 292b5e0845..39870ded57 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialSplineTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/PolynomialSplineTest.java
@@ -16,7 +16,10 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -84,8 +87,11 @@ public class PolynomialSplineTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final PolynomialSpline spline =
GeometryFactory.DEFAULT.createPolynomialSpline(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0),
null, null, 3,
+ null, null, null, null, 0);
+ assertEquals(1, spline.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ProductCurveTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ProductCurveTest.java
index b8d1a61f83..c121aeb328 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ProductCurveTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/ProductCurveTest.java
@@ -16,7 +16,10 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -33,9 +36,17 @@ public class ProductCurveTest extends GeometryTest {
public void testGetInterpolation() {
}
+ /**
+ * A product curve both extends {@link Curve}, whose default dimension is
1, and
+ * {@link org.apache.sis.geometries.GeometryCollection}, whose dimension
is the maximum of its
+ * elements. The two must agree, which is why this type overrides the
default explicitly.
+ */
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final LineString segment = GeometryFactory.DEFAULT.createLineString(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0));
+ final ProductCurve curve =
GeometryFactory.DEFAULT.createProductCurve(null, null, segment);
+ assertEquals(1, curve.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RhumbTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RhumbTest.java
index 7fe17e4b3c..8f739f4558 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RhumbTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/RhumbTest.java
@@ -16,7 +16,10 @@
*/
package org.apache.sis.geometries.curve;
+import org.apache.sis.geometries.GeometryFactory;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -74,8 +77,10 @@ public class RhumbTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final Rhumb rhumb = GeometryFactory.DEFAULT.createRhumb(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,10));
+ assertEquals(1, rhumb.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/SpiralTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/SpiralTest.java
index 30318c8b71..fce2953d13 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/SpiralTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/curve/SpiralTest.java
@@ -16,7 +16,14 @@
*/
package org.apache.sis.geometries.curve;
+import java.net.URI;
+import java.util.List;
+import org.opengis.util.GenericName;
+import org.apache.sis.geometries.GeometryFactory;
+import org.apache.sis.measure.Range;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -49,8 +56,16 @@ public class SpiralTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final RealFunction curvature = new RealFunction() {
+ @Override public GenericName getName() {return null;}
+ @Override public Range getDomain() {return null;}
+ @Override public List<URI> getMetadata() {return List.of();}
+ @Override public double value(double r){return 0;}
+ };
+ final Spiral spiral = GeometryFactory.DEFAULT.createSpiral(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0),
curvature, null, null);
+ assertEquals(1, spiral.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedCurveTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedCurveTest.java
index 6e6880f9fd..3cda2af249 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedCurveTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedCurveTest.java
@@ -16,9 +16,15 @@
*/
package org.apache.sis.geometries.internal.shared;
+import org.apache.sis.geometries.Curve;
+import org.apache.sis.geometries.GeometryFactory;
+import org.apache.sis.geometries.curve.LineString;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,10 +32,13 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class DefaultReversedCurveTest {
+public class DefaultReversedCurveTest extends GeometryTest {
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final LineString base = GeometryFactory.DEFAULT.createLineString(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0));
+ final Curve reversed = GeometryFactory.DEFAULT.createReversed(base);
+ assertEquals(1, reversed.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedSurfaceTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedSurfaceTest.java
index 24ba76d2ac..ea737c83e1 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedSurfaceTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/internal/shared/DefaultReversedSurfaceTest.java
@@ -16,9 +16,16 @@
*/
package org.apache.sis.geometries.internal.shared;
+import org.apache.sis.geometries.GeometryFactory;
+import org.apache.sis.geometries.Surface;
+import org.apache.sis.geometries.curve.LinearRing;
+import org.apache.sis.geometries.surface.Polygon;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.apache.sis.geometries.GeometryTest;
/**
@@ -26,10 +33,14 @@ import org.junit.jupiter.api.Test;
*
* @author Johann Sorel (Geomatys)
*/
-public class DefaultReversedSurfaceTest {
+public class DefaultReversedSurfaceTest extends GeometryTest {
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final LinearRing ring = GeometryFactory.DEFAULT.createLinearRing(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0,
10,10, 0,10, 0,0));
+ final Polygon base = GeometryFactory.DEFAULT.createPolygon(ring, null);
+ final Surface reversed = GeometryFactory.DEFAULT.createReversed(base);
+ assertEquals(2, reversed.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/solid/BSplineSolidTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/solid/BSplineSolidTest.java
index 2ea9e4f1d7..bbd701d395 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/solid/BSplineSolidTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/solid/BSplineSolidTest.java
@@ -16,7 +16,10 @@
*/
package org.apache.sis.geometries.solid;
+import org.apache.sis.geometries.GeometryFactory;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -94,8 +97,10 @@ public class BSplineSolidTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final BSplineSolid solid = GeometryFactory.DEFAULT.createBSolidSpline(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_3D, 0,0,0), null,
1, 1, 1);
+ assertEquals(3, solid.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/solid/PolyhedronTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/solid/PolyhedronTest.java
index 0b18c35cac..3de22ee515 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/solid/PolyhedronTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/solid/PolyhedronTest.java
@@ -16,7 +16,13 @@
*/
package org.apache.sis.geometries.solid;
+import org.apache.sis.geometries.GeometryCollection;
+import org.apache.sis.geometries.GeometryFactory;
+import org.apache.sis.geometries.curve.LinearRing;
+import org.apache.sis.geometries.surface.Polygon;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -54,8 +60,13 @@ public class PolyhedronTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final LinearRing ring = GeometryFactory.DEFAULT.createLinearRing(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0,
10,10, 0,10, 0,0));
+ final Polygon face = GeometryFactory.DEFAULT.createPolygon(ring, null);
+ final GeometryCollection<Polygon> shell =
GeometryFactory.DEFAULT.createMultiPolygon(face);
+ final Polyhedron polyhedron =
GeometryFactory.DEFAULT.createPolyhedron(shell, null);
+ assertEquals(3, polyhedron.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/CurvePolygonTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/CurvePolygonTest.java
index 9b59592677..41a3cac559 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/CurvePolygonTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/CurvePolygonTest.java
@@ -16,7 +16,11 @@
*/
package org.apache.sis.geometries.surface;
+import org.apache.sis.geometries.Curve;
+import org.apache.sis.geometries.GeometryFactory;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -64,8 +68,11 @@ public class CurvePolygonTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final Curve exterior = GeometryFactory.DEFAULT.createLineString(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0,
10,10, 0,10, 0,0));
+ final CurvePolygon polygon =
GeometryFactory.DEFAULT.createCurvePolygon(exterior, null);
+ assertEquals(2, polygon.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/ParametricCurveSurfaceTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/ParametricCurveSurfaceTest.java
index 21fcfffcef..81c8bb7621 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/ParametricCurveSurfaceTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/ParametricCurveSurfaceTest.java
@@ -17,6 +17,7 @@
package org.apache.sis.geometries.surface;
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -84,8 +85,9 @@ public class ParametricCurveSurfaceTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final ParametricCurveSurface sphere = new Sphere(3);
+ assertEquals(2, sphere.getTopologicDimension());
}
@Test
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/PolygonTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/PolygonTest.java
index 48cdb40bf9..2bff1d86e1 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/PolygonTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/PolygonTest.java
@@ -106,8 +106,8 @@ public abstract class PolygonTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ assertEquals(2, createPolygon(CRS_2D, SQUARE).getTopologicDimension());
}
/**
diff --git
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/PolyhedralSurfaceTest.java
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/PolyhedralSurfaceTest.java
index 97ebaa75c6..8dbc17fbeb 100644
---
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/PolyhedralSurfaceTest.java
+++
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/surface/PolyhedralSurfaceTest.java
@@ -16,7 +16,11 @@
*/
package org.apache.sis.geometries.surface;
+import org.apache.sis.geometries.GeometryFactory;
+import org.apache.sis.geometries.curve.LinearRing;
+
// Test dependencies
+import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.apache.sis.geometries.GeometryTest;
@@ -64,8 +68,12 @@ public class PolyhedralSurfaceTest extends GeometryTest {
}
@Test
- @Disabled("Not implemented yet.")
public void testGetTopologicDimension() {
+ final LinearRing ring = GeometryFactory.DEFAULT.createLinearRing(
+ GeometryFactory.DEFAULT.createDataPoints(CRS_2D, 0,0, 10,0,
10,10, 0,10, 0,0));
+ final Polygon patch = GeometryFactory.DEFAULT.createPolygon(ring,
null);
+ final PolyhedralSurface<Polygon> surface =
GeometryFactory.DEFAULT.createPolyhedralSurface(patch);
+ assertEquals(2, surface.getTopologicDimension());
}
@Test