如何在mysql中检查多边形的真lat/long

ep6jt1vc  于 2021-06-21  发布在  Mysql
关注(0)|答案(1)|浏览(289)

此查询没有结果:

select *
from provinces
 where ST_Contains(GeomFromText(CONCAT('POINT(',51.4, ' ', 37.2,')'),4326),polygon)
wh6knrhe

wh6knrhe1#

SELECT ea.entity_id,ea.latitude, ea.longitude ,c.name
from entity_addresses  as ea
inner join cities as c on  ST_CONTAINS(c.polygon, 
               ST_GeomFromText(ST_AsText(point(ea.longitude, ea.latitude)), 
4326))

相关问题