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

Accept GeoJSON Feature/File for AOI/Labels Upload #303

Open
jeafreezy opened this issue Nov 19, 2024 · 0 comments
Open

Accept GeoJSON Feature/File for AOI/Labels Upload #303

jeafreezy opened this issue Nov 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jeafreezy
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

When uploading training areas/aoi and aoi labels, we need to loop through each feature and then transform the feature to a WKT on the client before sending it to the backend.

Describe the solution you'd like

It would be great if the backend could accept the GeoJSON feature directly. This will eliminate the transformation step and remove some dependencies on the front end.

Describe alternatives you've considered

An alternative I've considered will be for the backend to accept the raw GeoJSON file directly as the user uploads it, without needing to read the file, loop through it, and send each feature to the backend. This is especially important for AOI labels because a GeoJSON file can have hundreds of labels.

Therefore, looping through each feature and making multiple concurrent API calls, just for a single AOI, is inefficient. See the attached screenshot for the concurrent calls made for a single AOI. Imagine uploading labels for about 5 different AOIs with each having 100 labels/features.

But if the backend gets the GeoJSON file directly, it can easily update the database by looping, batching, or even sending it to a background task.

Overall, this will lead to technical efficiency and also improve the user experience.

Screenshot 2024-11-19 at 08 38 54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant