-
Notifications
You must be signed in to change notification settings - Fork 316
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
Adds support for SRID. #111
Conversation
grimzy#64): - Updated SpatialTrait - Added new exception: UnknownSpatialFunctionException - Added unit and integration tests - Updated documentation - Moved test variables to phpunit.xml.dist - Added composer dependencies
[ci skip] [skip ci]
…ance Adds scopes orderByDistance() and orderByDistanceSphere()
[ci skip] [skip ci]
… fix-build-memory-exhausted
Fix build memory exhausted
Laravel 6 support
Do note that this PR bumps the MySQL version to 8.0 since older versions do not have or have minimal support for SRID. |
And the minimum Laravel version if 5.6 since SRID support for schema blueprint is available from then on. |
…hat the first axis is longitude and the second is latitude. Adds SRID to all the eloquent scopes.
Is it any news for when this PR will be merged to master? Thanks in advance. |
@denkurbatov do note that there are a few caveats with this PR including a database-level one on how the latitude and longitude is saved as EWKB. I have been using this version on my production server and had to rebuild the spatial fields as SRID 4326 requires you to set the first value as latitude and the second as longitude in MySQL 8.0. |
Thank you @sikhlana! Sorry for taking such a long time to look at this. This article explains a lot about this PR: https://mysqlserverteam.com/axis-order-in-spatial-reference-systems/ I also understand we have to start a With MySQL 8's WKT now defaulting to Regarding the migrations VS Laravel 5.6, I believe this commit and maybe one more change to I'll be merging this with the Thanks again @sikhlana! |
This PR adds full support of MySQL's SRID by implementing a simple EWKB parser on top of what is currently being used. More information can be found here: #54 (comment)