I saw this question: See if lat / long gets into the polygon using mysql
Indicates that the mysql GIS extensions are not yet fully implemented. Can someone clarify this for me - does this mean if I have a polygon and you want to determine if a point falls into a certain polygon, it will not be 100% accurate? If so, how accurate is that?
Also, the SQL required for this, from the top of my head, will it be something like strings:
SELECT * WHERE WITHIN(POINT(_LAT_ _LONG_), `polygon`)
(Where the polygon is the column of the table, and the point is built from the given lat and long values).
If the accuracy is sufficient, how would you find points close to the Lat and Long data? There are different opinions regarding the use of COS / SQRT or the built-in DISTANCE functions, which is best and / or what is the best way to do?
Essentially:
- Are mySQL GIS extensions expanded to the task of determining whether a point is in the polygon (should be fairly accurate, the polygon is not a specific shape or size).
- If so, then what is the best method to detect this and, moreover, you need a better method for finding points near a given Lat and Long value
source share