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

BUGFIX: Polygon and multipolygon fromWkt fix #38

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

ntatko
Copy link
Member

@ntatko ntatko commented Jun 3, 2024

Resolves #37

Thanks to @RMZeroFour for proposing a solution.

@ntatko ntatko added the 🐛 bug Something isn't working label Jun 3, 2024
Comment on lines +98 to 101
final polygonType = wkt.startsWith('MULTIPOLYGON');
if (!polygonType) {
throw ArgumentError('wkt is not a MultiPolygon');
}

Choose a reason for hiding this comment

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

I think this startsWith check should be added to Polygon.fromWKT too for consistency.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@RMZeroFour
Copy link

Seems good to me otherwise! I tested the changed methods for a few different cases, and they all passed without issues.

@ntatko ntatko merged commit 9888a5e into main Jun 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Polygon.fromWKT throws RangeError
2 participants