Skip to content

Commit

Permalink
narrows query of matching geoms in cluster query to those within Tile…
Browse files Browse the repository at this point in the history
…BBox re #10452
  • Loading branch information
whatisgalen committed Mar 8, 2024
1 parent 1151cd3 commit 071f144
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arches/app/views/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ def get(self, request, nodeid, zoom, x, y):
nodeid,
geom
FROM geojson_geometries
WHERE id in %s
WHERE
ST_Intersects(geom, TileBBox(%s, %s, %s, 3857))
AND
nodeid = %s and resourceinstanceid not in %s
) m
)
SELECT ST_AsMVT(
Expand Down Expand Up @@ -356,7 +359,7 @@ def get(self, request, nodeid, zoom, x, y):
WHERE cid IS NOT NULL
GROUP BY cid
) as tile;""",
[distance, min_points, search_geometries, nodeid, zoom, x, y, zoom, x, y],
[distance, min_points, zoom, x, y, nodeid, resource_ids, nodeid, zoom, x, y, zoom, x, y],
)
else:
tile = ""
Expand Down

0 comments on commit 071f144

Please sign in to comment.