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

Invalid parameter value: 3037 Invalid GIS data provided to function st_geometryfromtext #193

Open
svs22121990 opened this issue Jun 28, 2022 · 0 comments

Comments

@svs22121990
Copy link

Using Laravel 8 and "grimzy/laravel-mysql-spatial": "^4.0"
Database tried on both MariaDB 5.5.68 and MySQL 5.7

SQLSTATE[22023]: Invalid parameter value: 3037 Invalid GIS data provided to function st_geometryfromtext. (SQL: insert into geofences (map_type, map_points, points, name, category_id, updated_at, created_at) values (POLYGON, [{ "lat" :21.142264436519312, "lng" :79.06254081796669},{ "lat" :21.14322507216301, "lng" :79.08348350595497},{ "lat" :21.131536915439757, "lng" :79.07850532602333},{ "lat" :21.13345831957985, "lng" :79.057734299412}], ST_GeomFromText(POLYGON((79.077046204319 21.138962651755,79.080168295613 21.13988828496,79.079851794949 21.138492327803,79.077410984745 21.138222141028)), 0), Nagpur, 1, 2022-06-28 11:43:06, 2022-06-28 11:43:06))

Query looks correct not sure what is going wrong ? Please help !

insert into geofences (map_type, map_points, points, name, category_id, updated_at, created_at) values (POLYGON, [{ "lat" :21.142264436519312, "lng" :79.06254081796669},{ "lat" :21.14322507216301, "lng" :79.08348350595497},{ "lat" :21.131536915439757, "lng" :79.07850532602333},{ "lat" :21.13345831957985, "lng" :79.057734299412}], ST_GeomFromText(POLYGON((79.077046204319 21.138962651755,79.080168295613 21.13988828496,79.079851794949 21.138492327803,79.077410984745 21.138222141028)), 0), Nagpur, 1, 2022-06-28 11:43:06, 2022-06-28 11:43:06)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant