generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(geometries): Fix stringifyFloat to correctly format number
We missed the "." here and thus PHP formatted numbers with the default precision of 6 and prefixed it with whitespaces. See PHP docs: https://www.php.net/manual/en/function.sprintf.php This has been addressed by using the `json_encode` function to print the float. This function uses PHP's `serialize_precision` instead, which by default uses a similar algorithm to the one PostGIS uses for printing out the float in a minimal representation and also allows to print out at the maximum precision, as long as the user did not change the serialization precision config. Thanks @ronnypolloqueri for reporting this. (cherry picked from commit 3c364e3)
- Loading branch information
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters