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

[BUG] Priority area setting does not handle KML's altitude dimension in geometry field #6428

Open
ramyaragupathy opened this issue May 12, 2024 · 2 comments

Comments

@ramyaragupathy
Copy link
Member

Describe the bug

Raised by @frozenrabi through slack for project 16736

While updating a project's priority area using a KML file, file uploaded succeeded. However project save fails with an unknown error.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any project's edit section
  2. Click on priority areas from the edit section
  3. Choose to select a file
  4. Upload the KML file
  5. KML file data loads fine on map view
  6. Now attempt to save the project. This fails with a server error
  7. From server logs noticed this message psycopg2.errors.InvalidParameterValue: Geometry has Z dimension but column does not

Example file from @frozenrabi : https://drive.google.com/file/d/1dOcN41-NEePePC9BbyhOgS9sT09T5HnI/view?usp=sharing

Expected behavior

Priority areas should get updated for the project. Or if there is some error in the file it has to be indicated via an useful error message.

Screenshots
image

Additional context

Several applications like geojson.io, kepler.gl handles such files without any error messages. Even mapbox gl JS which we use for visualisation ignores the third field. I would recommend our application to ignore the third field and go ahead store the geometry in the backend.

@kaditya97 @royallsilwallz @manjitapandey @prabinoid @varun2948 @frozenrabi

Also tagging @kshitijrajsharma for his inputs.

Copy link

sentry-io bot commented May 12, 2024

Sentry Issue: TASKINGMANAGER-BACKEND-399

@ramyaragupathy
Copy link
Member Author

From discussion w/ @prabinoid - i think removing the third dimension in geometry should be handled by the frontend as the uploaded data has to be showcased for the end user. This data that's cleaned up by the frontend can be then passed on to the backend for DB storage.

@royallsilwallz - please add your comments.

cc @manjitapandey

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

No branches or pull requests

1 participant