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