Answer the question
In order to leave comments, you need to log in
Determining the distance between points and entering a point into a polygon?
People are confused with geometric objects in mysql
For example
SELECT ST_Distance_Sphere(ST_GeomFromText('POINT(59.92221140264606 30.33592959805362 )'), ST_GeomFromText('POINT( 59.91757448179685 30.34996245507689 )')) as distance
SELECT ST_Within(ST_GeomFromText('POINT(59.92221140264606 30.33592959805362 )'), ST_GeomFromText('POLYGON((59.960439 30.155863,59.970939 30.183329,60.00551300831579 30.30108880468746,59.97782267102391 30.418505281249995,59.90478568802594 30.452150609374957,59.873384939513095 30.331301148437454,59.890813753470574 30.22040838085935,59.912545 30.191226,59.924611 30.157924,59.945285999999996 30.139728,59.960439 30.155863))')) as inner_point
Answer the question
In order to leave comments, you need to log in
In a spherical system, the coordinates are not equivalent. When changing the order of coordinates, the distance between points will differ.
As an example: two points with a latitude of 90 °, any longitude. The distance between points is always zero. We change the order of coordinates: the longitude is 90 ° and the distance is no longer zero, but directly depends on the latitudes of the points.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question