Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inserting Lat/Long spatial extensions into MySQL

I'm wanting to put polygons into a MySQL database and then with PHP be able to query if a latitude/longitiude point is inside the polygon.

Any pointers here. Never done anything like this yet.

like image 894
user1104687 Avatar asked Apr 10 '26 19:04

user1104687


1 Answers

MySQL supports Spacial columns and functions using an extension which is quite often installed by default.

MySQL Reference for spacial features

How to use MySQL Spacial extension

like image 135
Skrol29 Avatar answered Apr 12 '26 09:04

Skrol29