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

BGDIINF_SB-2383 check for wrong geometry type #106

Closed

Conversation

procrastinatio
Copy link
Contributor

Currently, the validationb does check for the geometry type, so any valid GeoJSON will be turned into shapely and error might/will occur.

@github-actions github-actions bot added the bug label May 5, 2022
@procrastinatio procrastinatio force-pushed the bug-BGDIINF_SB-2383_check_for_wrong_geom_type branch from e34809a to 24aec06 Compare May 5, 2022 11:07
@procrastinatio procrastinatio requested a review from ltshb May 5, 2022 11:08
Copy link
Contributor

@ltshb ltshb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I already fixed this and another small issues with error handling see #107

@@ -45,7 +45,9 @@ def read_linestring():
geom_to_shape.is_valid
# pylint: disable=broad-except
except Exception:
abort(400, "Invalid Linestring syntax")
abort(400, "Invalid geometry syntax")
if geom_to_shape.geom_type != 'LineString':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point is valid and works.

@ltshb
Copy link
Contributor

ltshb commented May 5, 2022

Fixed by #107

@ltshb ltshb closed this May 5, 2022
@ltshb ltshb deleted the bug-BGDIINF_SB-2383_check_for_wrong_geom_type branch May 5, 2022 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants