Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write quadtree api endpoints. #448

Open
thomcom opened this issue Nov 22, 2022 · 1 comment
Open

Write quadtree api endpoints. #448

thomcom opened this issue Nov 22, 2022 · 1 comment

Comments

@thomcom
Copy link
Contributor

thomcom commented Nov 22, 2022

No description provided.

@thomcom
Copy link
Contributor Author

thomcom commented Nov 28, 2022

This task is essentially finished, as I wrote the quadtree endpoints before completing my last day on viz for this sprint.

Quadtree endpoints include:
POST /quadtree/create/:table
schema: {xAxisName: string, yAxisName: string}
This creates a named quadtree with default settings from a named table that has been previously read. xAxisName and yAxisName must be specified in the body of the POST request.

POST /quadtree/set_polygons_quadtree
schema: {name: string, polygon_offset: array, ring_offset: array, points: array}
This takes a GeoArrow polygons specification from the client. The client-specified name will be used to store the polygons in a new gpu buffer. Three buffers are specified: polygon_offset, ring_offset, and points.

GET /quadtree/get_points/:quadtree/:polygon
This request takes the name of the quadtree and the name of the polygon object, and returns an unordered set of points that fall within the polygon.

From here we'd like to use the quadtree indexing to inform the client behavior. My next step is to add a /quadtree/count_points/:quadtree/:polygon endpoint that instead of returning all the points, simply returns the number of points that were found. This will be used by the app to query specific quads of the display area to determine which quads require multiple requests and which quads can be filled out with a single request.

At app launch it should request the total number of points in the dataset, then the number of points in each of the four primary quads. The number of points in each quad inform the app as to how many quads it should subdivide the primary quads into in order to achieve the desired throughput rate for rendering new areas. Then it will request points form each quad iteratively, filling them in as responses come in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant