[FEA]: Allow to find the K nearest points to a polygon (using quadtree) #1324
Open
Description
opened on Jan 17, 2024
Is this a new feature, an improvement, or a change to existing functionality?
Improvement to existing functionality
How would you describe the priority of this feature request
Low priority, just an improvement
Please provide a clear description of problem you would like to solve.
Right now,
cuspatial.quadtree_point_to_nearest_linestring
allows to find the nearest point. It will be useful to find the N closest points to a feature (point, polygon or linestring)
Something similar to this article with Postgis:
https://www.crunchydata.com/blog/a-deep-dive-into-postgis-nearest-neighbor-search
SELECT loc.*, t.name, t.geom
FROM locations loc
JOIN LATERAL (SELECT name, geom FROM geonames gn
ORDER BY loc.geom <-> gn.geom LIMIT 10) AS t ON true;
Describe any alternatives you have considered
No response
Additional context
No response
Metadata
Assignees
Type
Projects
Status
Todo
Activity