Repository: ad-freiburg/qlever (language: python)

Issue:
QLever only parses WKT points with decimal points
The regular expression used to detect WKT points expects decimal points to be present in the coordinates, see https://github.com/ad-freiburg/qlever/blob/f856919842dc3492d2236fe4822d6662b582edcc/src/util/GeoSparqlHelpers.cpp#L27

This results in many correct WKT points within the allowed value range not being folded into the ID, see this query for examples: 

https://qlever.cs.uni-freiburg.de/osm-planet/uo4jNv


Discussion / hints:
@ullingerc Can you have a look? This should be very easy to fix. If not, please let us know.

Fix patch:
diff --git a/src/util/GeoSparqlHelpers.cpp b/src/util/GeoSparqlHelpers.cpp
index 3cc636491..796205dae 100644
--- a/src/util/GeoSparqlHelpers.cpp
+++ b/src/util/GeoSparqlHelpers.cpp
@@ -26,7 +26,7 @@ static constexpr auto wktPointRegex = ctll::fixed_string(
     "^\\s*[Pp][Oo][Ii][Nn][Tt]\\s*\\(\\s*"
     "(-?[0-9]+|-?[0-9]+\\.[0-9]+)"
     "\\s+"
-    "(-?[0-9+]|-?[0-9]+\\.[0-9]+)"
+    "(-?[0-9]+|-?[0-9]+\\.[0-9]+)"
     "\\s*\\)\\s*$");
 
 // Parse a single WKT point and returns a pair of longitude and latitude. If


Test patch:
diff --git a/test/GeoSparqlHelpersTest.cpp b/test/GeoSparqlHelpersTest.cpp
index f457785d6..4addc25e7 100644
--- a/test/GeoSparqlHelpersTest.cpp
+++ b/test/GeoSparqlHelpersTest.cpp
@@ -42,7 +42,12 @@ TEST(GeoSparqlHelpers, ParseWktPoint) {
   testParseWktPointCorrect("pOiNt(7 -0.0)", 7.0, 0.0);
   testParseWktPointCorrect(" pOiNt\t(  7 \r -0.0 \n ) ", 7.0, 0.0);
   testParseWktPointCorrect("POINT(2.2945 48.8585)", 2.2945, 48.8585);
+  testParseWktPointCorrect("POINT(2 48.8585)", 2.0, 48.8585);
+  testParseWktPointCorrect("POINT(20 48.8585)", 20.0, 48.8585);
   testParseWktPointCorrect("POINT(7.8529 47.9957)", 7.8529, 47.9957);
+  testParseWktPointCorrect("POINT(7.8529 47)", 7.8529, 47.0);
+  testParseWktPointCorrect("POINT(17 47)", 17.0, 47.0);
+  testParseWktPointCorrect("POINT(7 47)", 7.0, 47.0);
 
   // Invalid WKT points because of issues unrelated to the number format (one of
   // the quotes missing, one of the parentheses missing, it must be exactly two