X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/370c9b38c096468abb84fa29f605843cdeb9f93e..189f74a40de0f0f7ff1346a66d9beffe026d9e23:/nominatim/api/lookup.py diff --git a/nominatim/api/lookup.py b/nominatim/api/lookup.py index 410d030c..2934425a 100644 --- a/nominatim/api/lookup.py +++ b/nominatim/api/lookup.py @@ -23,8 +23,8 @@ def _select_column_geometry(column: SaColumn, """ if geometry_output & ntyp.GeometryFormat.GEOJSON: return sa.literal_column(f""" - ST_AsGeoJSON(CASE WHEN ST_NPoints({0}) > 5000 - THEN ST_SimplifyPreserveTopology({0}, 0.0001) + ST_AsGeoJSON(CASE WHEN ST_NPoints({column.name}) > 5000 + THEN ST_SimplifyPreserveTopology({column.name}, 0.0001) ELSE {column.name} END) """).label('geometry_geojson')