]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/db/sqlalchemy_types.py
switch reverse() to new Geometry datatype
[nominatim.git] / nominatim / db / sqlalchemy_types.py
index 88cae29f3a4e8982c60b32c33efc668ab88d7053..5131dad3fd5bb7e4b09621187a75e094c0417908 100644 (file)
@@ -48,6 +48,9 @@ class Geometry(types.UserDefinedType[Any]):
 
     class comparator_factory(types.UserDefinedType.Comparator):
 
+        def intersects(self, other: SaColumn) -> SaColumn:
+            return self.op('&&')(other)
+
         def is_line_like(self) -> SaColumn:
             return sa.func.ST_GeometryType(self, type_=sa.String).in_(('ST_LineString',
                                                                        'ST_MultiLineString'))