E
E
E6APB2017-08-23 08:37:25
MySQL
E6APB, 2017-08-23 08:37:25

How can I find out which polygon a point is in?

How to find which polygon a point is in?
I have polygons of regions of the Russian Federation stored in the polygons table. There are 8 of them, a large increase in their number is planned. Structure:
region_id (int), lat (decimal, 8, 6), lng (decimal, 9, 6).
region_id - ID of the region
lat - latitude of the point
lng - longitude of the point
How to find which polygon a point belongs to? How to optimize a query for loads? I need to know only the region_id of the polygon.
Google gives only information on how to check that the point is in the region.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2017-08-23
@E6APB

tyts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question