Giter Site home page Giter Site logo

Comments (19)

sikhlana avatar sikhlana commented on August 20, 2024 8

I've tested PR #184 on my production environment and works without any issue. Hopefully @grimzy will merge it as soon as possible.

from laravel-mysql-spatial.

nouman-ashraf-awan avatar nouman-ashraf-awan commented on August 20, 2024 5

@grimzy waiting for a update of this package with laravel 9.

from laravel-mysql-spatial.

eschricker avatar eschricker commented on August 20, 2024 4

@osteel totally aggree!
We have move to use https://github.com/MatanYadaev/laravel-eloquent-spatial

from laravel-mysql-spatial.

vesper8 avatar vesper8 commented on August 20, 2024 4

I m waiting for a update of this package with laravel 9 too...

I just migrated to https://github.com/MatanYadaev/laravel-eloquent-spatial and just as they mention above, it was extremely straightforward and easy, I suggest you do the same

from laravel-mysql-spatial.

johnwc avatar johnwc commented on August 20, 2024 4

SRID is not to make it faster by any means. A SRID tells the geometry "calculator" what coordinate system the geometry belongs to. Unless you have worked with spatial data, most people don't realize that a latitude and longitude could represent several different physical locations on the earth, depending on what coordinate system it is for. There are many different coordinate systems used to project physical locations on the earth. There is no default coordinate system defined, but... most of the lat/long/polygons that you see on the internet are for the World Geodetic System of 1984, aka WGS84. Which is Spatial Reference ID 4326.

If you do not know what your points/polygons in your data were projected from, aka what SRID they are for. Importing them with a unknown SRID or a wrong SRID can cause your points/polygons to be off placed on the earth. Ex: A point in San Francisco could be placed out in the pacific ocean. Your query results could be way off. I would not use any spatial engine that does not support SRIDs for it's geometry data types. Unless you know what the spatial engine assumes all the geometry points are, and make sure you project your data from it's SRID to what the spatial engine's SRID it is expecting.

One of the most annoying things when it comes to working with spatial data, is importing data from a third-party that uses some odd-ball coordinate system. Forcing you to run the entire data set through a projection calculator to project it from one SRID to the SRID you need it to be, before even being able to import it.

from laravel-mysql-spatial.

sikhlana avatar sikhlana commented on August 20, 2024 2

@Julien0510 I already raised an issue regarding this: MatanYadaev/laravel-eloquent-spatial#27

I am working on adding support for SRID since I already helped grimzy once with this package. But unfortunately the development is currently paused as I am working on a high-priority project rn.

from laravel-mysql-spatial.

nouman-ashraf-awan avatar nouman-ashraf-awan commented on August 20, 2024 2

@grimzy This is much needed. Please add compatibility for Laravel 9.

from laravel-mysql-spatial.

eschricker avatar eschricker commented on August 20, 2024 1

@vesper8 The migration was really easy and made the code more readable in my opinion . laravel-eloquent-spatial supports custom casts instead of using the property $spatialFields. As opposed to using the SpatialTrait to add querying functions, a CustomerEloquentBuilder is used. All supported functions are listed here: https://github.com/MatanYadaev/laravel-eloquent-spatial/blob/master/API.md
The functions you need to use should be whereDistanceSphere and orderByDistanceSphere. I think the migration should be problem free.

from laravel-mysql-spatial.

Jul000 avatar Jul000 commented on August 20, 2024 1

The main problem with Matan Yadaev package is the no support of srid, if someone has a solution ?

from laravel-mysql-spatial.

joelasaxton avatar joelasaxton commented on August 20, 2024

Excellent, Sikhlana!

from laravel-mysql-spatial.

zishang520 avatar zishang520 commented on August 20, 2024

17 days are gone.

from laravel-mysql-spatial.

osteel avatar osteel commented on August 20, 2024

To be honest this package looks pretty much abandoned (there could be many reasons for that). It's annoying but we'll probably have to suck it up and move on at some point. Unless someone wants to take the mantle – fork the project and take maintenance on (I don't)

from laravel-mysql-spatial.

osteel avatar osteel commented on August 20, 2024

@eschricker yep, does the job as far as I'm concerned. Cheers!

from laravel-mysql-spatial.

vesper8 avatar vesper8 commented on August 20, 2024

@eschricker @osteel Thanks for sharing the link to https://github.com/MatanYadaev/laravel-eloquent-spatial

Since you both appear to have moved to that from this library, can you say a few words about what the migration was like?

I currently use this library to to perform queries with distanceSphereValue and orderByDistance. Do you think migrating over would be fairly problem-free?

from laravel-mysql-spatial.

osteel avatar osteel commented on August 20, 2024

@vesper8 I only need casting Point values in and out so far, so the transition was very easy. Even feels more "Laravel native", to be honest. But I can't speak for your use case

from laravel-mysql-spatial.

Jul000 avatar Jul000 commented on August 20, 2024

I m waiting for a update of this package with laravel 9 too...

from laravel-mysql-spatial.

Mullersen avatar Mullersen commented on August 20, 2024

I was waiting too, but honestly it seems like it is not going to happen. I will probably be following @vesper8 and @eschricker and migrating to MatanYadaev and give an update on how it went here.

from laravel-mysql-spatial.

vesper8 avatar vesper8 commented on August 20, 2024

I had no idea SRID existed or what it was, after reading a bit about it, it seems like it basically makes things faster by adding a faster index to a table containing Point columns? It's not something I currently use at the scale I'm at, but I'd definitely adopt it if it promises to make things faster. So I'm hoping @sikhlana finds the time to add that PR after he's done with his current project.

from laravel-mysql-spatial.

desaintflorent avatar desaintflorent commented on August 20, 2024

I'm also in the need to move to Laravel 9 and I'm using SRID a lot in my app.
@sikhlana, let us know if you find the time to make SRID work on MatanYadaev package and we will try your PR πŸ™

from laravel-mysql-spatial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.