From 1f85b7af3fb6b3df5911dc218ef678e1a672976f Mon Sep 17 00:00:00 2001 From: Rafael Biehler Date: Wed, 25 Dec 2024 20:47:24 +0100 Subject: [PATCH] Mql: Handle case where input is already PolyGeometry --- .../main/java/org/polypheny/db/functions/MqlFunctions.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/org/polypheny/db/functions/MqlFunctions.java b/core/src/main/java/org/polypheny/db/functions/MqlFunctions.java index 8b6ca0834b..24a68a2910 100644 --- a/core/src/main/java/org/polypheny/db/functions/MqlFunctions.java +++ b/core/src/main/java/org/polypheny/db/functions/MqlFunctions.java @@ -866,6 +866,10 @@ else if (distanceMultiplier.isDouble()){ * - A document that adheres to the GeoJSON specification. */ public static PolyGeometry convertInputToPolyGeometry( PolyValue input, Integer srid ) { + if (input.isGeometry()){ + return input.asGeometry(); + } + GeometryFactory geoFactory = new GeometryFactory(new PrecisionModel(), srid ); // Legacy Coordinates