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 9488d8cbc1 feat(Geometry): add GeometryProcessor, merge TransfiniteSet
in Geometry
9488d8cbc1 is described below
commit 9488d8cbc1fc0af4234013993a320df127212058
Author: jsorel <[email protected]>
AuthorDate: Mon Aug 24 16:34:05 2026 +0200
feat(Geometry): add GeometryProcessor, merge TransfiniteSet in Geometry
---
.../main/org/apache/sis/geometries/Geometry.java | 211 +++++++++++++++++-
.../org/apache/sis/geometries/TransfiniteSet.java | 30 ---
.../geometries/operation/GeometryOperations.java | 1 +
.../geometries/operation/GeometryProcessor.java | 241 +++++++++++++++++++++
.../org/apache/sis/geometries/package-info.java | 8 +-
5 files changed, 453 insertions(+), 38 deletions(-)
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 27e171f062..e5084b11d9 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
@@ -18,6 +18,9 @@ package org.apache.sis.geometries;
import java.util.List;
import java.util.Map;
+import javax.measure.quantity.Length;
+import org.apache.sis.geometries.operation.GeometryProcessor;
+import org.apache.sis.geometries.operation.OperationException;
import static org.opengis.annotation.Specification.ISO_19107;
import org.opengis.annotation.UML;
import org.opengis.geometry.DirectPosition;
@@ -37,10 +40,17 @@ import
org.opengis.referencing.crs.CoordinateReferenceSystem;
* <li>Khronos ANARI-1 - https://www.khronos.org/anari/</li>
* </ul>
*
+ * <p>
+ * Deviation from ISO-19107 :<br>
+ * A Geometry should be a sub type of TransfiniteSetOfDirectPositions (section
6.4.2)
+ * A TransfiniteSetOfDirectPositions exist to define a Geometry within the
<b>Set theory</b>, it is a mathematical conceptual interface.
+ * But the interface has only a unique subtype and provide a single additional
method contains(DirectPosition),
+ * therefor we merged TransfiniteSetOfDirectPositions in Geometry for
simplicity state
+ *
* @author Johann Sorel (Geomatys)
*/
@UML(identifier="Geometry", specification=ISO_19107) // section 6.4.4
-public interface Geometry extends TransfiniteSet {
+public interface Geometry {
/**
* Get geometry coordinate system.
@@ -282,4 +292,203 @@ public interface Geometry extends TransfiniteSet {
return null;
}
+ // ////////////////////////////////////////////////////////////////////////
+ // ISO 19107 Query2D and Query3D interfaces and merged inside Geometry
+ // ////////////////////////////////////////////////////////////////////////
+
+ /**
+ * @see GeometryProcessor#buffer(org.apache.sis.geometries.Geometry,
double)
+ */
+ public default Geometry buffer(double distance) throws OperationException {
+ return new GeometryProcessor().buffer(this, distance);
+ }
+
+ /**
+ * @see GeometryProcessor#buffer(org.apache.sis.geometries.Geometry,
javax.measure.quantity.Length)
+ */
+ @UML(identifier="buffer", specification=ISO_19107) // section 6.4.4.24 and
6.4.8.3
+ //@UML(identifier="3Dbuffer", specification=ISO_19107) // section 6.4.9
+ public default Geometry buffer(Length radius) throws OperationException {
+ return new GeometryProcessor().buffer(this, radius);
+ }
+
+ /**
+ * @see GeometryProcessor#convexHull(org.apache.sis.geometries.Geometry)
+ */
+ //@UML(identifier="3DconvexHull", specification=ISO_19107) // section 6.4.9
+ public default Geometry convexHull() throws OperationException {
+ return new GeometryProcessor().convexHull(this);
+ }
+
+ /**
+ * @see GeometryProcessor#difference(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="difference", specification=ISO_19107) // section 6.4.4.30
and 6.4.8.5
+ //@UML(identifier="3Ddifference", specification=ISO_19107) // section 6.4.9
+ public default Geometry difference(Geometry other) throws
OperationException {
+ return new GeometryProcessor().difference(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#distance(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ public default double distance(Geometry other) throws OperationException {
+ return new GeometryProcessor().distance(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#distance2(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="distance", specification=ISO_19107) // section 6.4.4.26
and 6.4.8.2
+ //@UML(identifier="3Ddistance", specification=ISO_19107) // section 6.4.9
+ public default Length distance2(Geometry other) throws OperationException {
+ return new GeometryProcessor().distance2(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#intersection(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="intersection", specification=ISO_19107) // section
6.4.4.30 and 6.4.8.4
+ //@UML(identifier="3Dintersection", specification=ISO_19107) // section
6.4.9
+ public default Geometry intersection(Geometry other) throws
OperationException {
+ return new GeometryProcessor().intersection(this, other);
+ }
+
+ /**
+ * @see
GeometryProcessor#symDifference(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="symDifference", specification=ISO_19107) // section
6.4.4.30 and 6.4.8.6
+ //@UML(identifier="3DsymDifference", specification=ISO_19107) // section
6.4.9
+ public default Geometry symDifference(Geometry other) throws
OperationException {
+ return new GeometryProcessor().symDifference(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#union(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="union", specification=ISO_19107) // section 6.4.4.30 and
6.4.8.7
+ //@UML(identifier="3Dunion", specification=ISO_19107) // section 6.4.9
+ public default Geometry union(Geometry other) throws OperationException {
+ return new GeometryProcessor().union(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#contains(org.apache.sis.geometries.Geometry,
org.opengis.geometry.DirectPosition)
+ */
+ @UML(identifier="contains", specification=ISO_19107) // section 6.4.4.30 ?
+ //@UML(identifier="3Dcontains", specification=ISO_19107) // section 6.4.9
+ public default boolean contains(DirectPosition element) throws
OperationException {
+ return new GeometryProcessor().contains(this, element);
+ }
+
+ /**
+ * @see GeometryProcessor#contains(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="contains", specification=ISO_19107) // section 6.4.8.8,
6.4.4.2
+ public default boolean contains(Geometry other) throws OperationException {
+ return new GeometryProcessor().contains(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#crosses(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="crosses", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Dcrosses", specification=ISO_19107) // section 6.4.9
+ public default boolean crosses(Geometry other) throws OperationException {
+ return new GeometryProcessor().crosses(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#disjoint(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="disjoint", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Ddisjoint", specification=ISO_19107) // section 6.4.9
+ public default boolean disjoint(Geometry other) throws OperationException {
+ return new GeometryProcessor().disjoint(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#equal(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="equals", specification=ISO_19107) // section 6.4.8.8,
6.4.4.30
+ //@UML(identifier="3Dequals", specification=ISO_19107) // section 6.4.9
+ public default boolean equal(Geometry other) throws OperationException {
+ return new GeometryProcessor().equal(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#intersects(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="intersects", specification=ISO_19107) // section 6.4.8.8,
6.4.4.30
+ //@UML(identifier="3Dintersects", specification=ISO_19107) // section 6.4.9
+ public default boolean intersects(Geometry other) throws
OperationException {
+ return new GeometryProcessor().intersects(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#locateAlong(org.apache.sis.geometries.Geometry,
double)
+ */
+ public default Geometry locateAlong(double mValue) throws
OperationException {
+ return new GeometryProcessor().locateAlong(this, mValue);
+ }
+
+ /**
+ * @see GeometryProcessor#contains(org.apache.sis.geometries.Geometry,
double, double)
+ */
+ public default Geometry contains(double mStart, double mEnd) throws
OperationException {
+ return new GeometryProcessor().contains(this, mStart, mEnd);
+ }
+
+ /**
+ * @see GeometryProcessor#overlaps(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="overlaps", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Doverlaps", specification=ISO_19107) // section 6.4.9
+ public default boolean overlaps(Geometry other) throws OperationException {
+ return new GeometryProcessor().overlaps(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#relate(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry, int)
+ */
+ public default boolean relate(Geometry other, int matrix) throws
OperationException {
+ return new GeometryProcessor().relate(this, other, matrix);
+ }
+
+ /**
+ * @see GeometryProcessor#relate(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry, java.lang.String)
+ */
+ @UML(identifier="relate", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Drelate", specification=ISO_19107) // section 6.4.9
+ public default boolean relate(Geometry other, String matrix) throws
OperationException {
+ return new GeometryProcessor().relate(this, other, matrix);
+ }
+
+ /**
+ * @see GeometryProcessor#touches(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="touches", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Dtouches", specification=ISO_19107) // section 6.4.9
+ public default boolean touches(Geometry other) throws OperationException {
+ return new GeometryProcessor().touches(this, other);
+ }
+
+ /**
+ * @see GeometryProcessor#within(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry)
+ */
+ @UML(identifier="within", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Dwithin", specification=ISO_19107) // section 6.4.9
+ public default boolean within(Geometry other) throws OperationException {
+ return new GeometryProcessor().within(this, other);
+ }
+
+ /**
+ * @see
GeometryProcessor#withinDistance(org.apache.sis.geometries.Geometry,
org.apache.sis.geometries.Geometry, javax.measure.quantity.Length)
+ */
+ @UML(identifier="withinDistance", specification=ISO_19107) // section
6.4.8.8
+ //@UML(identifier="3DwithinDistance", specification=ISO_19107) // section
6.4.9
+ public default boolean withinDistance(Geometry other, Length distance)
throws OperationException {
+ return new GeometryProcessor().withinDistance(this, other, distance);
+ }
+
}
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/TransfiniteSet.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/TransfiniteSet.java
deleted file mode 100644
index 04d7374679..0000000000
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/TransfiniteSet.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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;
-
-import static org.opengis.annotation.Specification.ISO_19107;
-import org.opengis.annotation.UML;
-
-
-/**
- *
- * @author Johann Sorel (Geomatys)
- */
-@UML(identifier="TransfiniteSetOfDirectPositions", specification=ISO_19107) //
section 6.4.2
-public interface TransfiniteSet {
-
-}
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/operation/GeometryOperations.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/operation/GeometryOperations.java
index 2ccb2d18cb..ec051efcef 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/operation/GeometryOperations.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/operation/GeometryOperations.java
@@ -74,6 +74,7 @@ import org.apache.sis.geometries.processor.Processor;
/**
*
* @author Johann Sorel (Geomatys)
+ * @deprecated
*/
public final class GeometryOperations {
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/operation/GeometryProcessor.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/operation/GeometryProcessor.java
new file mode 100644
index 0000000000..5a9ca9133c
--- /dev/null
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/operation/GeometryProcessor.java
@@ -0,0 +1,241 @@
+/*
+ * 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.operation;
+
+import javax.measure.quantity.Length;
+import org.apache.sis.geometries.Geometry;
+import static org.opengis.annotation.Specification.ISO_19107;
+import org.opengis.annotation.UML;
+import org.opengis.geometry.DirectPosition;
+
+/**
+ * Geometry operation computation processor.
+ *
+ * NOTE/TODO :
+ * There is the case of 2D versus 3D operations in ISO-19107.
+ * ISO separate operations in 2d and 3d, and when dealing with 3D geometries
with a 2D operation
+ * then the geometry must be projected.
+ * Currently the code stays in the dimension the geometry is in.
+ * We will wait and see how this goes and maybe separate the two dimension or
provide 2d wrapper if needed.
+ *
+ * @see OGC Simple Feature Access 1.2.1 - 6.1.2.4 Methods that support spatial
analysis
+ * @see OGC Simple Feature Access 1.2.1 - 6.1.2.3 Methods for testing spatial
relations between geometric objects
+ * @see ISO_19107 Query2D section 6.4.8
+ * @see ISO_19107 Query3D section 6.4.9
+ * @author Johann Sorel (Geomatys)
+ */
+public final class GeometryProcessor {
+
+ public GeometryProcessor(){}
+
+ /**
+ * Returns a geometric object that represents all Points whose distance
from this geometric object is less than
+ * or equal to distance. Calculations are in the spatial reference system
of this geometric object. Because of the
+ * limitations of linear interpolation, there will often be some
relatively small error in this distance,
+ * but it should be near the resolution of the coordinates used.
+ */
+ public Geometry buffer(Geometry geom, double distance) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ @UML(identifier="buffer", specification=ISO_19107) // section 6.4.4.24 and
6.4.8.3
+ //@UML(identifier="3Dbuffer", specification=ISO_19107) // section 6.4.9
+ public Geometry buffer(Geometry geom, Length radius) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns a geometric object that represents the convex hull of this
geometric object.
+ * Convex hulls, being dependent on straight lines, can be accurately
represented in linear interpolations
+ * for any geometry restricted to linear interpolations.
+ */
+ //@UML(identifier="3DconvexHull", specification=ISO_19107) // section 6.4.9
+ public Geometry convexHull(Geometry geom) throws OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns a geometric object that represents the Point set difference of
this geometric object with anotherGeometry.
+ */
+ @UML(identifier="difference", specification=ISO_19107) // section 6.4.4.30
and 6.4.8.5
+ //@UML(identifier="3Ddifference", specification=ISO_19107) // section 6.4.9
+ public Geometry difference(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns the shortest distance between any two Points in the two
geometric objects as calculated in the
+ * spatial reference system of this geometric object.
+ * Because the geometries are closed, it is possible to find a point on
each geometric object involved, such that
+ * the distance between these 2 points is the returned distance between
their geometric objects.
+ */
+ public double distance(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ @UML(identifier="distance", specification=ISO_19107) // section 6.4.4.26
and 6.4.8.2
+ //@UML(identifier="3Ddistance", specification=ISO_19107) // section 6.4.9
+ public Length distance2(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns a geometric object that represents the Point set intersection
of this geometric object with anotherGeometry.
+ */
+ @UML(identifier="intersection", specification=ISO_19107) // section
6.4.4.30 and 6.4.8.4
+ //@UML(identifier="3Dintersection", specification=ISO_19107) // section
6.4.9
+ public Geometry intersection(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns a geometric object that represents the Point set symmetric
difference of this geometric
+ * object with anotherGeometry.
+ */
+ @UML(identifier="symDifference", specification=ISO_19107) // section
6.4.4.30 and 6.4.8.6
+ //@UML(identifier="3DsymDifference", specification=ISO_19107) // section
6.4.9
+ public Geometry symDifference(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns a geometric object that represents the Point set union of this
geometric object with anotherGeometry.
+ */
+ @UML(identifier="union", specification=ISO_19107) // section 6.4.4.30 and
6.4.8.7
+ //@UML(identifier="3Dunion", specification=ISO_19107) // section 6.4.9
+ public Geometry union(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ @UML(identifier="contains", specification=ISO_19107) // section 6.4.4.30 ?
+ //@UML(identifier="3Dcontains", specification=ISO_19107) // section 6.4.9
+ public boolean contains(Geometry geom1, DirectPosition element) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns TRUE if this geometric object “spatially contains”
anotherGeometry.
+ */
+ @UML(identifier="contains", specification=ISO_19107) // section 6.4.8.8,
6.4.4.2
+ public boolean contains(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns TRUE if this geometric object “spatially crosses”
anotherGeometry.
+ */
+ @UML(identifier="crosses", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Dcrosses", specification=ISO_19107) // section 6.4.9
+ public boolean crosses(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns TRUE if this geometric object “spatially disjoint”
anotherGeometry.
+ */
+ @UML(identifier="disjoint", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Ddisjoint", specification=ISO_19107) // section 6.4.9
+ public boolean disjoint(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns TRUE if this geometric object “spatially equal” anotherGeometry.
+ */
+ @UML(identifier="equals", specification=ISO_19107) // section 6.4.8.8,
6.4.4.30
+ //@UML(identifier="3Dequals", specification=ISO_19107) // section 6.4.9
+ public boolean equal(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns TRUE if this geometric object “spatially intersects”
anotherGeometry.
+ */
+ @UML(identifier="intersects", specification=ISO_19107) // section 6.4.8.8,
6.4.4.30
+ //@UML(identifier="3Dintersects", specification=ISO_19107) // section 6.4.9
+ public boolean intersects(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns a derived geometry collection value that matches the specified
m coordinate value.
+ * See Subclause 6.1.2.6 “Measures on Geometry” for more details.
+ */
+ public Geometry locateAlong(Geometry geom1, double mValue) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns a derived geometry collection value that matches the specified
range of m coordinate values inclusively.
+ * See Subclause 6.1.2.6 “Measures on Geometry” for more details.
+ */
+ public Geometry contains(Geometry geom1, double mStart, double mEnd)
throws OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns TRUE if this geometric object “spatially overlaps”
anotherGeometry.
+ */
+ @UML(identifier="overlaps", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Doverlaps", specification=ISO_19107) // section 6.4.9
+ public boolean overlaps(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns TRUE if this geometric object is spatially related to
anotherGeometry by testing for intersections between
+ * the interior, boundary and exterior of the two geometric objects as
specified by the values in the
+ * intersectionPatternMatrix.
+ * This returns FALSE if all the tested intersections are empty except
exterior (this) intersect exterior (another).
+ *
+ * @todo merge with ISO Relate beneath
+ */
+ public boolean relate(Geometry geom1, Geometry geom2, int matrix) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ @UML(identifier="relate", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Drelate", specification=ISO_19107) // section 6.4.9
+ public boolean relate(Geometry geom1, Geometry geom2, String matrix)
throws OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns TRUE if this geometric object “spatially touches”
anotherGeometry.
+ */
+ @UML(identifier="touches", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Dtouches", specification=ISO_19107) // section 6.4.9
+ public boolean touches(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns TRUE if this geometric object “spatially within”
anotherGeometry.
+ */
+ @UML(identifier="within", specification=ISO_19107) // section 6.4.8.8
+ //@UML(identifier="3Dwithin", specification=ISO_19107) // section 6.4.9
+ public boolean within(Geometry geom1, Geometry geom2) throws
OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+ @UML(identifier="withinDistance", specification=ISO_19107) // section
6.4.8.8
+ //@UML(identifier="3DwithinDistance", specification=ISO_19107) // section
6.4.9
+ public boolean withinDistance(Geometry geom1, Geometry geom2, Length
distance) throws OperationException {
+ throw new UnsupportedOperationException();
+ }
+
+}
diff --git
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/package-info.java
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/package-info.java
index c1030b444e..e9acbf46c6 100644
---
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/package-info.java
+++
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/package-info.java
@@ -37,18 +37,12 @@
* <li>SRID : replaced by getCoordinateReferenceSystem</li>
* <li>is3D : look at geometry CoordinateReferenceSystem instead</li>
* <li>isMeasured() : replaced by Attributive interface which holds more
informations.</li>
- * <li>Relation and query function have been moved to {@link
org.apache.sis.geometries.operation.GeometryOperations GeometryOperations}</li>
- * <li>Query3D interface is moved to {@link
org.apache.sis.geometries.operation.GeometryOperations#SpatialAnalysis3D
SpatialAnalysis3D}
- * and {@link
org.apache.sis.geometries.operation.GeometryOperations#SpatialRelations3D
SpatialRelations3D}</li>
* </ul>
*
* <h3>Key differences with ISO 19107</h3>
* <ul>
+ * <li>The TransfiniteSetOfDirectPositions interface is merged in Geometry,
check the class javadoc for details</li>
* <li>Encoding interface is fused in Geometry interface</li>
- * <li>Query2D interface is moved to {@link
org.apache.sis.geometries.operation.GeometryOperations#SpatialAnalysis2D
SpatialAnalysis2D}
- * and {@link
org.apache.sis.geometries.operation.GeometryOperations#SpatialRelations2D
SpatialRelations2D}</li>
- * <li>Query3D interface is moved to {@link
org.apache.sis.geometries.operation.GeometryOperations#SpatialAnalysis3D
SpatialAnalysis3D}
- * and {@link
org.apache.sis.geometries.operation.GeometryOperations#SpatialRelations3D
SpatialRelations3D}</li>
* <li>Encoding.asGML has been removed since it is a large task to implement
and multiple versions
* exists. GML support should be located in a different module</li>
* </ul>