Skip to content

[FEA]: Allow to find the K nearest points to a polygon (using quadtree) #1324

Open
@fpenarruApr

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    ExternalIssues filed by people outside the teamPythonRelated to Python codefeature requestNew feature or request

    Type

    No type

    Projects

    • Status

      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions