You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2024/02/12 21:59:48 UTC
(jena) 01/03: Checks for existence of Z axis and measure
This is an automated email from the ASF dual-hosted git repository.
andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git
commit 409590127684b8aa613448564e29da7306f7b08f
Author: Lorenz Buehmann <bu...@infai.org>
AuthorDate: Tue Jan 30 08:44:06 2024 +0100
Checks for existence of Z axis and measure
---
.../geosparql/implementation/jts/CustomCoordinateSequence.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/jena-geosparql/src/main/java/org/apache/jena/geosparql/implementation/jts/CustomCoordinateSequence.java b/jena-geosparql/src/main/java/org/apache/jena/geosparql/implementation/jts/CustomCoordinateSequence.java
index c037bc550e..143dfaedaa 100644
--- a/jena-geosparql/src/main/java/org/apache/jena/geosparql/implementation/jts/CustomCoordinateSequence.java
+++ b/jena-geosparql/src/main/java/org/apache/jena/geosparql/implementation/jts/CustomCoordinateSequence.java
@@ -394,7 +394,14 @@ public class CustomCoordinateSequence implements CoordinateSequence, Serializabl
public void getCoordinate(int index, Coordinate coord) {
coord.setX(x[index]);
coord.setY(y[index]);
- coord.setZ(z[index]);
+
+ if (spatialDimension > 2) {
+ coord.setZ(z[index]);
+ }
+
+ if (measuresDimension == 1) {
+ coord.setM(m[index]);
+ }
}
@Override