Skip to content

Conversation

@amuttsch
Copy link

@amuttsch amuttsch commented Oct 21, 2025

Very small double values that contain three or more zeros after the dot (like 0.000123) have a string representation of 1.23E-4. The readPointWkt did not account for this and set the end pos to the E, thus the BigDecimal tried to parse "1.23E". This resulted in a NumberFormatException.

This fixes the issue by also allowing the minus sign when determining the end of the number.

Please backport this fix to version 12, thanks!

Fixes #2820

Very small coordinates that contain three or more zeros after the dot (like 0.000123) have a string representation of 1.23E-4. The readPointWkt did not account for this and set the end pos to the E, thus the BigDecimal tried to parse "1.23E". This resulted in a NumberFormatException.

This fixes the issue by also allowing the minus sign when determining the end of the number.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Under Review Used for pull requests under review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Creating a Geography with very small coordinates causes a NumberFormatException

3 participants